Class EntityId

java.lang.Object
org.dizitart.no2.repository.EntityId

public class EntityId extends Object
Represents the unique identifier for an entity in an ObjectRepository.

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
  • Constructor Details

    • EntityId

      public EntityId(String fieldName, String... subFields)
  • Method Details

    • 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.