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
The default implementation of the
EntityElement interface.- Author:
- Luca Frosini (ISTI - CNR)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MetadataThe metadata of the entity.protected UUIDThe unique identifier of the entity.Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, NAME, TYPE_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
NAMEFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetID()Returns the unique identifier (UUID) of the element.Returns the metadata associated with the element.voidSets the unique identifier (UUID) for the element.voidsetMetadata(Metadata metadata) Sets the metadata for the element.Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl
getTypeName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeName
-
Field Details
-
uuid
The unique identifier of the entity. -
metadata
The metadata of the entity.
-
-
Constructor Details
-
EntityElementImpl
protected EntityElementImpl()Default constructor.
-
-
Method Details
-
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:
getIDin interfaceEntityElement- Specified by:
getIDin interfaceIdentifiableElement- Returns:
- The
UUIDof the element.
-
setID
Sets the unique identifier (UUID) for the element.- Specified by:
setIDin interfaceEntityElement- Specified by:
setIDin interfaceIdentifiableElement- Parameters:
uuid- TheUUIDto set.
-
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:
getMetadatain interfaceEntityElement- Specified by:
getMetadatain interfaceIdentifiableElement- Returns:
- The
Metadataof the element, ornullif none is set.
-
setMetadata
Sets the metadata for the element.- Specified by:
setMetadatain interfaceEntityElement- Specified by:
setMetadatain interfaceIdentifiableElement- Parameters:
metadata- TheMetadatato associate with the element.
-