@Handler(supports=OpenmrsObject.class) public class OpenmrsObjectSaveHandler extends java.lang.Object implements SaveHandler<OpenmrsObject>
OpenmrsObject
. When an
OpenmrsObject
is saved (via a save* method in a service), this handler is automatically
called by the RequiredDataAdvice
AOP class. RequiredDataHandler
,
SaveHandler
Constructor and Description |
---|
OpenmrsObjectSaveHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handle(OpenmrsObject openmrsObject,
User creator,
java.util.Date dateCreated,
java.lang.String reason)
This sets the uuid property on the given OpenmrsObject if it is non-null.
|
public void handle(OpenmrsObject openmrsObject, User creator, java.util.Date dateCreated, java.lang.String reason)
handle
in interface RequiredDataHandler<OpenmrsObject>
handle
in interface SaveHandler<OpenmrsObject>
openmrsObject
- an OpenmrsObject that needs to have some required data setcreator
- the user who is saving this objectdateCreated
- the datetime this object is being savedreason
- (optional) would be the second argument in the save method, if existsRequiredDataHandler.handle(org.openmrs.OpenmrsObject,
org.openmrs.User, java.util.Date, java.lang.String)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.