@Handler(supports=OpenmrsObject.class) public class OpenmrsObjectSaveHandler extends 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,
Date dateCreated,
String reason)
This sets the uuid property on the given OpenmrsObject if it is non-null.
|
public void handle(OpenmrsObject openmrsObject, User creator, Date dateCreated, 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 existsShould set empty string properties to null
Should not set empty string properties to null for AllowEmptyStrings annotation
Should not trim empty strings for AllowLeadingOrTrailingWhitespace annotation
Should trim strings without AllowLeadingOrTrailingWhitespace annotation
Should trim empty strings for AllowEmptyStrings annotation
Copyright © 2024 OpenMRS Inc.. All rights reserved.