org.openmrs.api.handler
Class PersonNameSaveHandler

java.lang.Object
  extended by org.openmrs.api.handler.PersonNameSaveHandler
All Implemented Interfaces:
RequiredDataHandler<PersonName>, SaveHandler<PersonName>

@Handler(supports=PersonName.class)
public class PersonNameSaveHandler
extends java.lang.Object
implements SaveHandler<PersonName>

This is called every time a PersonName object is saved. The current implemention just trims out the whitespace from the beginning and end of the given/middle/familyname/familyName2 attributes


Constructor Summary
PersonNameSaveHandler()
           
 
Method Summary
 void handle(PersonName personName, User creator, java.util.Date dateCreated, java.lang.String other)
          This method is used by the implementing classes to set any required data that it needs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonNameSaveHandler

public PersonNameSaveHandler()
Method Detail

handle

public void handle(PersonName personName,
                   User creator,
                   java.util.Date dateCreated,
                   java.lang.String other)
Description copied from interface: SaveHandler
This method is used by the implementing classes to set any required data that it needs to.

Specified by:
handle in interface RequiredDataHandler<PersonName>
Specified by:
handle in interface SaveHandler<PersonName>
Parameters:
personName - an OpenmrsObject that needs to have some required data set
creator - the user who is saving this object
dateCreated - the datetime this object is being saved
other - (optional) would be the second argument in the save method, if exists
See Also:
SaveHandler.handle(org.openmrs.OpenmrsObject, org.openmrs.User, java.util.Date, java.lang.String)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change