Class AuditEntity
- java.lang.Object
-
- com.netflix.genie.web.data.services.impl.jpa.entities.IdEntity
-
- com.netflix.genie.web.data.services.impl.jpa.entities.AuditEntity
-
- All Implemented Interfaces:
AuditProjection
,IdProjection
,java.io.Serializable
- Direct Known Subclasses:
FileEntity
,TagEntity
,UniqueIdEntity
@MappedSuperclass public class AuditEntity extends IdEntity implements AuditProjection
Abstract class to support basic columns for all entities for genie.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AuditEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.time.Instant
getCreated()
Get when this entity was created.java.time.Instant
getUpdated()
Get the time this entity was updated.int
hashCode()
protected void
onCreateBaseEntity()
Updates the created and updated timestamps to be creation time.protected void
onUpdateBaseEntity()
On any update to the entity will update the update time.-
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.IdProjection
getId
-
-
-
-
Method Detail
-
onCreateBaseEntity
protected void onCreateBaseEntity()
Updates the created and updated timestamps to be creation time.
-
onUpdateBaseEntity
protected void onUpdateBaseEntity()
On any update to the entity will update the update time.
-
getCreated
public java.time.Instant getCreated()
Get when this entity was created.- Specified by:
getCreated
in interfaceAuditProjection
- Returns:
- The created timestamps
-
getUpdated
public java.time.Instant getUpdated()
Get the time this entity was updated.- Specified by:
getUpdated
in interfaceAuditProjection
- Returns:
- The updated timestamp
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-