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 booleanequals(java.lang.Object o)java.time.InstantgetCreated()Get when this entity was created.java.time.InstantgetUpdated()Get the time this entity was updated.inthashCode()protected voidonCreateBaseEntity()Updates the created and updated timestamps to be creation time.protected voidonUpdateBaseEntity()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:
getCreatedin interfaceAuditProjection- Returns:
- The created timestamps
-
getUpdated
public java.time.Instant getUpdated()
Get the time this entity was updated.- Specified by:
getUpdatedin interfaceAuditProjection- Returns:
- The updated timestamp
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-