Package step.core.accessors
Class AbstractIdentifiableObject
- java.lang.Object
-
- step.core.accessors.AbstractIdentifiableObject
-
- Direct Known Subclasses:
AbstractOrganizableObject,AbstractUser
public class AbstractIdentifiableObject extends Object
This class is the parent class of all objects that have to be identified uniquely for persistence purposes for instance
-
-
Constructor Summary
Constructors Constructor Description AbstractIdentifiableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomField(String key, Object value)<T> TcomputeCustomFieldIfAbsent(String key, Function<? super String,T> mappingFunction)booleanequals(Object obj)ObjectgetCustomField(String key)<T> TgetCustomField(String key, Class<T> valueClass)Map<String,Object>getCustomFields()org.bson.types.ObjectIdgetId()inthashCode()voidsetCustomFields(Map<String,Object> customFields)voidsetId(org.bson.types.ObjectId _id)
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public org.bson.types.ObjectId getId()
- Returns:
- the unique ID of this object
-
setId
public void setId(org.bson.types.ObjectId _id)
- Parameters:
_id- the unique ID of this object
-
computeCustomFieldIfAbsent
public <T> T computeCustomFieldIfAbsent(String key, Function<? super String,T> mappingFunction)
-
-