Package google.registry.model
Class UpdateAutoTimestampEntity
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.UpdateAutoTimestampEntity
- All Implemented Interfaces:
UnsafeSerializable
,Serializable
,Cloneable
- Direct Known Subclasses:
AllocationToken
,Cursor
,EppResource
,RdeRevision
,RegistrarBase
,RegistryLock
,UserBase
@MappedSuperclass
public abstract class UpdateAutoTimestampEntity
extends ImmutableObject
implements UnsafeSerializable
Base class for entities that contains an
UpdateAutoTimestamp
which is updated every time
the entity is persisted.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
CopiesupdateTimestamp
from another entity.Get theUpdateAutoTimestamp
for this entity.protected void
Resets theupdateTimestamp
to force Hibernate to persist it.protected void
setUpdateTimestamp
(UpdateAutoTimestamp timestamp) Sets theupdateTimestamp
.Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
UpdateAutoTimestampEntity
public UpdateAutoTimestampEntity()
-
-
Method Details
-
getUpdateTimestamp
Get theUpdateAutoTimestamp
for this entity. -
copyUpdateTimestamp
CopiesupdateTimestamp
from another entity.This method is for the few cases when
updateTimestamp
is copied between different types of entities. UseImmutableObject.clone(T)
for same-type copying. -
resetUpdateTimestamp
protected void resetUpdateTimestamp()Resets theupdateTimestamp
to force Hibernate to persist it.This method is for use in setters in derived builders that do not result in the derived object being persisted.
-
setUpdateTimestamp
Sets theupdateTimestamp
.This method is for use in the few places where we need to restore the update timestamp after mutating a collection in order to force the new timestamp to be persisted when it ordinarily wouldn't.
-