Class ContactHistory

  • All Implemented Interfaces:
    Buildable, DatastoreEntity, SqlEntity, java.lang.Cloneable

    @Entity
    public class ContactHistory
    extends HistoryEntry
    implements SqlEntity
    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.

    This class is only marked as a Datastore entity subclass and registered with Objectify so that when building it its ID can be auto-populated by Objectify. It is converted to its superclass HistoryEntry when persisted to Datastore using TransactionManager.

    • Constructor Detail

      • ContactHistory

        public ContactHistory()
    • Method Detail

      • getContactRepoId

        public java.lang.String getContactRepoId()
      • getContactBase

        public java.util.Optional<ContactBase> getContactBase()
        The values of all the fields on the ContactBase 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.

      • getResourceAtPointInTime

        public java.util.Optional<? extends EppResource> getResourceAtPointInTime()
        Description copied from class: HistoryEntry
        Throws an error when attempting to retrieve the EppResource at this point in time.

        Subclasses must override this to return the resource; it is non-abstract for legacy reasons and objects created prior to the Registry 3.0 migration.

        Overrides:
        getResourceAtPointInTime in class HistoryEntry
      • beforeSqlSaveOnReplay

        public void beforeSqlSaveOnReplay()
        Description copied from interface: SqlEntity
        A method that will be called before the object is saved to SQL in asynchronous replay.
        Specified by:
        beforeSqlSaveOnReplay in interface SqlEntity