All Implemented Interfaces:
AuditProjection, BaseProjection, IdProjection, SetupFileProjection, UniqueIdProjection, Serializable
Direct Known Subclasses:
ApplicationEntity, ClusterEntity, CommandEntity, JobEntity

@MappedSuperclass public class BaseEntity extends UniqueIdEntity implements BaseProjection, SetupFileProjection
The base for all Genie top level entities. e.g. Applications, Jobs, etc.
Since:
2.0.0
See Also:
  • Method Details

    • getDescription

      public Optional<String> getDescription()
      Get the description of this resource.
      Specified by:
      getDescription in interface BaseProjection
      Returns:
      The description which could be null so it's wrapped in Optional
    • setDescription

      public void setDescription(@Nullable String description)
      Set the description of this entity.
      Parameters:
      description - The description
    • getMetadata

      public Optional<com.fasterxml.jackson.databind.JsonNode> getMetadata()
      Get the metadata of this entity which is unstructured JSON.
      Specified by:
      getMetadata in interface BaseProjection
      Returns:
      Optional of the metadata json node
    • setMetadata

      public void setMetadata(@Nullable com.fasterxml.jackson.databind.JsonNode metadata)
      Set the JSON metadata of this entity.
      Parameters:
      metadata - The metadata of this entity
    • getSetupFile

      public Optional<FileEntity> getSetupFile()
      Get the setup file for this resource.
      Specified by:
      getSetupFile in interface SetupFileProjection
      Returns:
      The setup file
    • setSetupFile

      public void setSetupFile(@Nullable FileEntity setupFile)
      Set the setup file for this entity.
      Parameters:
      setupFile - The setup file. Null clears reference in the database
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class UniqueIdEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UniqueIdEntity