Class EppResource

All Implemented Interfaces:
Buildable, UnsafeSerializable, Serializable, Cloneable
Direct Known Subclasses:
ContactBase, DomainBase, HostBase

@MappedSuperclass public abstract class EppResource extends UpdateAutoTimestampEntity implements Buildable
An EPP entity object (i.e. a domain, contact, or host).
See Also:
  • Constructor Details

    • EppResource

      public EppResource()
  • Method Details

    • getRepoId

      public String getRepoId()
    • setRepoId

      public void setRepoId(String repoId)
      Sets the repository ID.

      This should only be used for restoring the repo id of an object being loaded in a PostLoad method (effectively, when it is still under construction by Hibernate). In all other cases, the object should be regarded as immutable and changes should go through a Builder.

      In addition to this special case use, this method must exist to satisfy Hibernate.

    • getCreationTime

      public final org.joda.time.DateTime getCreationTime()
    • getCreationRegistrarId

      public String getCreationRegistrarId()
    • getLastEppUpdateTime

      public org.joda.time.DateTime getLastEppUpdateTime()
    • getLastEppUpdateRegistrarId

      public String getLastEppUpdateRegistrarId()
    • getPersistedCurrentSponsorRegistrarId

      public final String getPersistedCurrentSponsorRegistrarId()
      Get the stored value of currentSponsorRegistrarId.

      For subordinate hosts, this value may not represent the actual current client id, which is the client id of the superordinate host. For all other resources this is the true client id.

    • getStatusValues

      public final com.google.common.collect.ImmutableSet<StatusValue> getStatusValues()
    • getDeletionTime

      public org.joda.time.DateTime getDeletionTime()
    • cloneProjectedAtTime

      public abstract EppResource cloneProjectedAtTime(org.joda.time.DateTime now)
      Return a clone of the resource with timed status values modified using the given time.
    • getForeignKey

      public abstract String getForeignKey()
      Get the foreign key string for this resource.
    • createVKey

      public abstract VKey<? extends EppResource> createVKey()
      Create the VKey for the specified EPP resource.
      Overrides:
      createVKey in class ImmutableObject
    • asBuilder

      public abstract EppResource.Builder<?,?> asBuilder()
      Override of Buildable.asBuilder() so that the extra methods are visible.
      Specified by:
      asBuilder in interface Buildable
    • setCacheForTest

      public static void setCacheForTest(Optional<Duration> expiry)
    • loadCached

      public static com.google.common.collect.ImmutableMap<VKey<? extends EppResource>,EppResource> loadCached(Iterable<VKey<? extends EppResource>> keys)
      Loads the given EppResources by their keys using the cache (if enabled).

      Don't use this unless you really need it for performance reasons, and be sure that you are OK with the trade-offs in loss of transactional consistency.

    • loadCached

      public static <T extends EppResource> T loadCached(VKey<T> key)
      Loads a given EppResource by its key using the cache (if enabled).

      Don't use this unless you really need it for performance reasons, and be sure that you are OK with the trade-offs in loss of transactional consistency.