Package google.registry.model.contact
Class ContactHistory
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.reporting.HistoryEntry
-
- google.registry.model.contact.ContactHistory
-
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
@Entity public class ContactHistory extends HistoryEntry
A persisted history entry representing an EPP modification to a contact.In addition to the general history fields (e.g. action time, registrar ID) we also persist a copy of the contact entity at this point in time. We persist a raw
ContactBase
so that the foreign-keyed fields in that class can refer to this object.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContactHistory.Builder
-
Nested classes/interfaces inherited from class google.registry.model.reporting.HistoryEntry
HistoryEntry.HistoryEntryId, HistoryEntry.Type
-
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,B extends Buildable.GenericBuilder<?,?>>, Buildable.Overlayable<T>
-
-
Field Summary
-
Fields inherited from class google.registry.model.reporting.HistoryEntry
repoId, revisionId
-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description ContactHistory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContactHistory.Builder
asBuilder()
VKey<ContactHistory>
createVKey()
Creates aVKey
instance for this entity.java.util.Optional<ContactBase>
getContactBase()
The values of all the fields on theContactBase
object after the action represented by this history object was executed.protected ContactBase
getResource()
java.util.Optional<? extends EppResource>
getResourceAtPointInTime()
-
Methods inherited from class google.registry.model.reporting.HistoryEntry
copy, createBuilderForResource, getBySuperuser, getHistoryEntryId, getModificationTime, getReason, getRegistrarId, getRepoId, getRequestedByRegistrar, getResourceType, getRevisionId, getTrid, getType, getXmlBytes, postLoad, processResourcePostLoad
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
getResource
protected ContactBase getResource()
- Specified by:
getResource
in classHistoryEntry
-
getContactBase
public java.util.Optional<ContactBase> getContactBase()
The values of all the fields on theContactBase
object after the action represented by this history object was executed.Will be absent for objects created prior to the Registry 3.0 SQL migration.
-
createVKey
public VKey<ContactHistory> createVKey()
Creates aVKey
instance for this entity.- Overrides:
createVKey
in classImmutableObject
-
getResourceAtPointInTime
public java.util.Optional<? extends EppResource> getResourceAtPointInTime()
- Specified by:
getResourceAtPointInTime
in classHistoryEntry
-
asBuilder
public ContactHistory.Builder asBuilder()
- Specified by:
asBuilder
in interfaceBuildable
- Specified by:
asBuilder
in classHistoryEntry
-
-