Interface IdAware
-
- All Known Implementing Classes:
CreateSetupDomainMapperMember,UpdateValidationDomainMapperMember
public interface IdAwareProvides a reflective way to get and set id information on a POJO. By default, the implementation assumes a field namedidis available in the POJO with appropriate get/set bean methods.- Author:
- Jeff Fischer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIdAware.Id
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default IdAware.IdgetId(Object object)For the given pojo instance, retrieve the identifier field and the value of that field.default voidsetId(Object object, String idVal)For the given pojo instance, set the identifier field value.
-
-
-
Method Detail
-
getId
default IdAware.Id getId(Object object)
For the given pojo instance, retrieve the identifier field and the value of that field. By default, the implementation expects aidfield with a correspondinggetId()method.- Parameters:
object- The object containing entity data, specifically an id value.- Returns:
- The pair of id field name, and id value
-
setId
default void setId(Object object, String idVal)
For the given pojo instance, set the identifier field value. By default, the implementation expects aidfield with a correspondingsetId(..)method.- Parameters:
object- The object containing entity data, specifically an id value.idVal- The value to set for the id field
-
-