Class EntityElementImpl

java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.entities.EntityElementImpl
All Implemented Interfaces:
Serializable, Element, EntityElement, IdentifiableElement
Direct Known Subclasses:
ContextImpl, EntityImpl, QueryTemplateImpl

public abstract class EntityElementImpl extends ElementImpl implements EntityElement
The default implementation of the EntityElement interface.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Details

    • uuid

      protected UUID uuid
      The unique identifier of the entity.
    • metadata

      protected Metadata metadata
      The metadata of the entity.
  • Constructor Details

    • EntityElementImpl

      protected EntityElementImpl()
      Default constructor.
  • Method Details

    • getID

      public UUID getID()
      Returns the unique identifier (UUID) of the element.

      This UUID is used to uniquely identify the entity instance. It is read-only, mandatory, and cannot be null.

      Specified by:
      getID in interface EntityElement
      Specified by:
      getID in interface IdentifiableElement
      Returns:
      The UUID of the element.
    • setID

      public void setID(UUID uuid)
      Sets the unique identifier (UUID) for the element.
      Specified by:
      setID in interface EntityElement
      Specified by:
      setID in interface IdentifiableElement
      Parameters:
      uuid - The UUID to set.
    • getMetadata

      public Metadata getMetadata()
      Returns the metadata associated with the element.

      The metadata is included in JSON serialization only if it is not null.

      Metadata is automatically managed by the system and is mandatory.

      Specified by:
      getMetadata in interface EntityElement
      Specified by:
      getMetadata in interface IdentifiableElement
      Returns:
      The Metadata of the element, or null if none is set.
    • setMetadata

      public void setMetadata(Metadata metadata)
      Sets the metadata for the element.
      Specified by:
      setMetadata in interface EntityElement
      Specified by:
      setMetadata in interface IdentifiableElement
      Parameters:
      metadata - The Metadata to associate with the element.