Package org.dizitart.no2.repository
Class EntityId
- java.lang.Object
-
- org.dizitart.no2.repository.EntityId
-
public class EntityId extends Object
Represents the unique identifier for an entity in anObjectRepository
.An entity ID consists of a field name and optional sub-fields. If sub-fields are present, the ID is considered to be embedded.
- Since:
- 4.0
- Author:
- Anindya Chatterjee
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filter
createUniqueFilter(Object value, NitriteMapper nitriteMapper)
Creates a unique filter for the entity id.String[]
getEmbeddedFields()
Returns the embedded field names of the id field.List<String>
getEncodedFieldNames()
Returns a list of encoded field names.String
getFieldName()
Returns the name of the id field.boolean
isEmbedded()
Checks if the entity id is an embedded id.
-
-
-
Method Detail
-
getEncodedFieldNames
public List<String> getEncodedFieldNames()
Returns a list of encoded field names.- Returns:
- a list of encoded field names.
-
isEmbedded
public boolean isEmbedded()
Checks if the entity id is an embedded id.- Returns:
- true if the entity id is embedded; false otherwise.
-
createUniqueFilter
public Filter createUniqueFilter(Object value, NitriteMapper nitriteMapper)
Creates a unique filter for the entity id.- Parameters:
value
- the value of the id.nitriteMapper
- the nitrite mapper.- Returns:
- the unique filter.
-
getFieldName
public String getFieldName()
Returns the name of the id field.
-
getEmbeddedFields
public String[] getEmbeddedFields()
Returns the embedded field names of the id field.
-
-