Package google.registry.model
Class UpdateAutoTimestampEntity
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.UpdateAutoTimestampEntity
-
- All Implemented Interfaces:
UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
AllocationToken
,Cursor
,EppResource
,RdeRevision
,Registrar
,RegistryLock
,User
@MappedSuperclass public abstract class UpdateAutoTimestampEntity extends ImmutableObject implements UnsafeSerializable
Base class for entities that contains anUpdateAutoTimestamp
which is updated every time the entity is persisted.- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description UpdateAutoTimestampEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyUpdateTimestamp(UpdateAutoTimestampEntity other)
CopiesupdateTimestamp
from another entity.UpdateAutoTimestamp
getUpdateTimestamp()
Get theUpdateAutoTimestamp
for this entity.protected void
resetUpdateTimestamp()
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
-
-
-
-
Method Detail
-
getUpdateTimestamp
public UpdateAutoTimestamp getUpdateTimestamp()
Get theUpdateAutoTimestamp
for this entity.
-
copyUpdateTimestamp
protected void copyUpdateTimestamp(UpdateAutoTimestampEntity other)
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
protected void setUpdateTimestamp(UpdateAutoTimestamp timestamp)
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.
-
-