Package step.core.accessors
Class AbstractIdentifiableObject
- java.lang.Object
-
- step.core.accessors.AbstractIdentifiableObject
-
- Direct Known Subclasses:
AbstractOrganizableObject
,ControllerSetting
,ReportNode
,ResourceRevision
,StagingContext
,User
,ViewModel
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
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bson.types.ObjectId
_id
protected Map<String,Object>
customFields
-
Constructor Summary
Constructors Constructor Description AbstractIdentifiableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCustomField(String key, Object value)
Object
computeCustomFieldIfAbsent(String key, Function<? super String,? extends Object> mappingFunction)
boolean
equals(Object obj)
Object
getCustomField(String key)
<T> T
getCustomField(String key, Class<T> valueClass)
Map<String,Object>
getCustomFields()
org.bson.types.ObjectId
getId()
int
hashCode()
void
setCustomFields(Map<String,Object> customFields)
void
setId(org.bson.types.ObjectId _id)
-
-
-
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 Object computeCustomFieldIfAbsent(String key, Function<? super String,? extends Object> mappingFunction)
-
-