Package google.registry.model.host
Class HostHistory
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.reporting.HistoryEntry
-
- google.registry.model.host.HostHistory
-
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
@Entity public class HostHistory extends HistoryEntry
A persisted history entry representing an EPP modification to a host.In addition to the general history fields (e.g. action time, registrar ID) we also persist a copy of the host entity at this point in time. We persist a raw
HostBase
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
HostHistory.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 HostHistory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HostHistory.Builder
asBuilder()
VKey<HostHistory>
createVKey()
Creates aVKey
instance for this entity.java.util.Optional<HostBase>
getHostBase()
The values of all the fields on theHostBase
object after the action represented by this history object was executed.protected HostBase
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 HostBase getResource()
- Specified by:
getResource
in classHistoryEntry
-
getHostBase
public java.util.Optional<HostBase> getHostBase()
The values of all the fields on theHostBase
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<HostHistory> 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 HostHistory.Builder asBuilder()
- Specified by:
asBuilder
in interfaceBuildable
- Specified by:
asBuilder
in classHistoryEntry
-
-