|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.handler.OpenmrsObjectSaveHandler
@Handler(supports=OpenmrsObject.class) public class OpenmrsObjectSaveHandler
This class deals with any object that implements OpenmrsObject
. When an
OpenmrsObject
is saved (via a save* method in a service), this handler is automatically
called by the RequiredDataAdvice
AOP class.
This class sets the uuid property on the given OpenmrsObject to a randomly generated UUID if it is non-null.
RequiredDataHandler
,
SaveHandler
Constructor Summary | |
---|---|
OpenmrsObjectSaveHandler()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OpenmrsObjectSaveHandler()
Method Detail |
---|
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)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |