Package google.registry.model.reporting
Class HistoryEntry
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.reporting.HistoryEntry
-
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
ContactHistory
,DomainHistory
,HostHistory
@MappedSuperclass public abstract class HistoryEntry extends ImmutableObject implements Buildable, UnsafeSerializable
A record of an EPP command that mutated a resource.This abstract class has three subclasses that include the parent resource itself and are persisted to Cloud SQL.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HistoryEntry.Builder<T extends HistoryEntry,B extends HistoryEntry.Builder<?,?>>
A builder forHistoryEntry
since it is immutablestatic class
HistoryEntry.HistoryEntryId
Class to represent the composite primary key of aHistoryEntry
.static class
HistoryEntry.Type
Represents the type of history entry.-
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 Modifier and Type Field Description protected java.lang.String
repoId
The repo ID of the embeddedEppResource
that this event mutated.protected java.lang.Long
revisionId
The autogenerated id of this event.-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description HistoryEntry()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract HistoryEntry.Builder<? extends HistoryEntry,?>
asBuilder()
protected static void
copy(HistoryEntry src, HistoryEntry dst)
static <E extends EppResource>
HistoryEntry.Builder<? extends HistoryEntry,?>createBuilderForResource(E parent)
boolean
getBySuperuser()
HistoryEntry.HistoryEntryId
getHistoryEntryId()
org.joda.time.DateTime
getModificationTime()
java.lang.String
getReason()
java.lang.String
getRegistrarId()
java.lang.String
getRepoId()
java.lang.Boolean
getRequestedByRegistrar()
protected abstract EppResource
getResource()
abstract java.util.Optional<? extends EppResource>
getResourceAtPointInTime()
java.lang.Class<? extends EppResource>
getResourceType()
long
getRevisionId()
Trid
getTrid()
Returns the TRID, which may be null if the entry was not created by a normal flow.HistoryEntry.Type
getType()
byte[]
getXmlBytes()
protected void
postLoad()
protected void
processResourcePostLoad()
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Field Detail
-
revisionId
protected java.lang.Long revisionId
The autogenerated id of this event.
-
repoId
protected java.lang.String repoId
The repo ID of the embeddedEppResource
that this event mutated.Note that the embedded EPP resource is of a base type for which the repo ID field is
@Transient
, which is NOT persisted as part of the embedded entity. After aHistoryEntry
is loaded from SQL, thepostLoad()
methods re-populates the field inside the EPP resource.
-
-
Method Detail
-
getRevisionId
public long getRevisionId()
-
getResource
protected abstract EppResource getResource()
-
getResourceType
public java.lang.Class<? extends EppResource> getResourceType()
-
getRepoId
public java.lang.String getRepoId()
-
getHistoryEntryId
public HistoryEntry.HistoryEntryId getHistoryEntryId()
-
getType
public HistoryEntry.Type getType()
-
getXmlBytes
public byte[] getXmlBytes()
-
getModificationTime
public org.joda.time.DateTime getModificationTime()
-
getRegistrarId
public java.lang.String getRegistrarId()
-
getTrid
@Nullable public Trid getTrid()
Returns the TRID, which may be null if the entry was not created by a normal flow.
-
getBySuperuser
public boolean getBySuperuser()
-
getReason
public java.lang.String getReason()
-
getRequestedByRegistrar
public java.lang.Boolean getRequestedByRegistrar()
-
getResourceAtPointInTime
public abstract java.util.Optional<? extends EppResource> getResourceAtPointInTime()
-
processResourcePostLoad
protected void processResourcePostLoad()
-
postLoad
protected void postLoad()
-
asBuilder
public abstract HistoryEntry.Builder<? extends HistoryEntry,?> asBuilder()
-
copy
protected static void copy(HistoryEntry src, HistoryEntry dst)
-
createBuilderForResource
public static <E extends EppResource> HistoryEntry.Builder<? extends HistoryEntry,?> createBuilderForResource(E parent)
-
-