Class HistoryEntry

java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.reporting.HistoryEntry
All Implemented Interfaces:
Buildable, UnsafeSerializable, Serializable, 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:
  • Field Details

    • revisionId

      protected Long revisionId
      The autogenerated id of this event.
    • repoId

      protected String repoId
      The repo ID of the embedded EppResource 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 a HistoryEntry is loaded from SQL, the postLoad() methods re-populates the field inside the EPP resource.

  • Constructor Details

    • HistoryEntry

      public HistoryEntry()
  • Method Details

    • getRevisionId

      public long getRevisionId()
    • getResource

      protected abstract EppResource getResource()
    • getResourceType

      public Class<? extends EppResource> getResourceType()
    • getRepoId

      public 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 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 String getReason()
    • getRequestedByRegistrar

      public Boolean getRequestedByRegistrar()
    • getResourceAtPointInTime

      public abstract Optional<? extends EppResource> getResourceAtPointInTime()
    • processResourcePostLoad

      protected void processResourcePostLoad()
    • postLoad

      protected void postLoad()
    • asBuilder

      public abstract HistoryEntry.Builder<? extends HistoryEntry,?> asBuilder()
      Specified by:
      asBuilder in interface Buildable
    • copy

      protected static void copy(HistoryEntry src, HistoryEntry dst)
    • createBuilderForResource

      public static <E extends EppResource> HistoryEntry.Builder<? extends HistoryEntry,?> createBuilderForResource(E parent)