Class 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 Detail

      • EntityId

        public EntityId​(String fieldName,
                        String... subFields)
    • 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.