Class BaseEntity
java.lang.Object
com.netflix.genie.web.data.services.impl.jpa.entities.IdEntity
com.netflix.genie.web.data.services.impl.jpa.entities.AuditEntity
com.netflix.genie.web.data.services.impl.jpa.entities.UniqueIdEntity
com.netflix.genie.web.data.services.impl.jpa.entities.BaseEntity
- 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 Summary
Modifier and TypeMethodDescriptionboolean
Get the description of this resource.Optional<com.fasterxml.jackson.databind.JsonNode>
Get the metadata of this entity which is unstructured JSON.Get the setup file for this resource.int
hashCode()
void
setDescription
(String description) Set the description of this entity.void
setMetadata
(com.fasterxml.jackson.databind.JsonNode metadata) Set the JSON metadata of this entity.void
setSetupFile
(FileEntity setupFile) Set the setup file for this entity.Methods inherited from class com.netflix.genie.web.data.services.impl.jpa.entities.AuditEntity
getCreated, getUpdated, onCreateBaseEntity, onUpdateBaseEntity
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.AuditProjection
getCreated, getUpdated
Methods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.BaseProjection
getName, getStatus, getUser, getVersion
Methods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.IdProjection
getId
Methods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.UniqueIdProjection
getUniqueId
-
Method Details
-
getDescription
Get the description of this resource.- Specified by:
getDescription
in interfaceBaseProjection
- Returns:
- The description which could be null so it's wrapped in Optional
-
setDescription
Set the description of this entity.- Parameters:
description
- The description
-
getMetadata
Get the metadata of this entity which is unstructured JSON.- Specified by:
getMetadata
in interfaceBaseProjection
- 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
Get the setup file for this resource.- Specified by:
getSetupFile
in interfaceSetupFileProjection
- Returns:
- The setup file
-
setSetupFile
Set the setup file for this entity.- Parameters:
setupFile
- The setup file. Null clears reference in the database
-
equals
- Overrides:
equals
in classUniqueIdEntity
-
hashCode
public int hashCode()- Overrides:
hashCode
in classUniqueIdEntity
-