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 TypeMethodDescriptionbooleanGet 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.inthashCode()voidsetDescription(String description) Set the description of this entity.voidsetMetadata(com.fasterxml.jackson.databind.JsonNode metadata) Set the JSON metadata of this entity.voidsetSetupFile(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, onUpdateBaseEntityMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.AuditProjection
getCreated, getUpdatedMethods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.BaseProjection
getName, getStatus, getUser, getVersionMethods inherited from interface com.netflix.genie.web.data.services.impl.jpa.queries.projections.IdProjection
getIdMethods 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:
getDescriptionin 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:
getMetadatain 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:
getSetupFilein 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:
equalsin classUniqueIdEntity
-
hashCode
public int hashCode()- Overrides:
hashCodein classUniqueIdEntity
-