Interface IdAware
-
- All Known Implementing Classes:
CreateSetupDomainMapperMember
,UpdateValidationDomainMapperMember
public interface IdAware
Provides a reflective way to get and set id information on a POJO. By default, the implementation assumes a field namedid
is available in the POJO with appropriate get/set bean methods.- Author:
- Jeff Fischer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IdAware.Id
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default IdAware.Id
getId(Object object)
For the given pojo instance, retrieve the identifier field and the value of that field.default void
setId(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 aid
field 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 aid
field with a correspondingsetId(..)
method.- Parameters:
object
- The object containing entity data, specifically an id value.idVal
- The value to set for the id field
-
-