Package google.registry.model.contact
Class ContactBase
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.BackupGroupRoot
-
- google.registry.model.EppResource
-
- google.registry.model.contact.ContactBase
-
- All Implemented Interfaces:
Buildable
,EppResource.ResourceWithTransferData
,java.lang.Cloneable
- Direct Known Subclasses:
ContactResource
@MappedSuperclass @Embeddable public class ContactBase extends EppResource implements EppResource.ResourceWithTransferData
A persistable contact resource including mutable and non-mutable fields.This class deliberately does not include an
Id
so that any foreign-keyed fields can refer to the proper parent entity's ID, whether we're storing this in the DB itself or as part of another entity- See Also:
- RFC 5733
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ContactBase.Builder<T extends ContactBase,B extends ContactBase.Builder<T,B>>
A builder for constructingContactResource
, since it is immutable.-
Nested classes/interfaces inherited from class google.registry.model.EppResource
EppResource.BuilderWithTransferData<T extends TransferData,B extends EppResource.BuilderWithTransferData<T,B>>, EppResource.ForeignKeyedEppResource, EppResource.ResourceWithTransferData<T extends TransferData>
-
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotCompare, ImmutableObject.DoNotHydrate, ImmutableObject.EmptySetToNull, 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.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description ContactBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ContactBase.Builder
asBuilder()
Override ofBuildable.asBuilder()
so that the extra methods are visible.protected static <T extends ContactBase>
TcloneContactProjectedAtTime(T contact, org.joda.time.DateTime now)
Clones the contact (or subclass).ContactBase
cloneProjectedAtTime(org.joda.time.DateTime now)
Return a clone of the resource with timed status values modified using the given time.VKey<? extends ContactBase>
createVKey()
Create the VKey for the specified EPP resource.ContactAuthInfo
getAuthInfo()
java.lang.String
getContactId()
java.lang.String
getCurrentSponsorClientId()
Disclose
getDisclose()
java.lang.String
getEmailAddress()
ContactPhoneNumber
getFaxNumber()
java.lang.String
getForeignKey()
Get the foreign key string for this resource.PostalInfo
getInternationalizedPostalInfo()
org.joda.time.DateTime
getLastTransferTime()
The time that this resource was last transferred.PostalInfo
getLocalizedPostalInfo()
com.google.common.collect.ImmutableList<PostalInfo>
getPostalInfosAsList()
Postal info for the contact.java.lang.String
getSearchName()
ContactTransferData
getTransferData()
ContactPhoneNumber
getVoiceNumber()
-
Methods inherited from class google.registry.model.EppResource
getCreationClientId, getCreationTime, getDeletionTime, getLastEppUpdateClientId, getLastEppUpdateTime, getPersistedCurrentSponsorClientId, getRepoId, getRevisions, getStatusValues, loadCached, loadCached, setCacheForTest
-
Methods inherited from class google.registry.model.BackupGroupRoot
getUpdateTimestamp
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
createVKey
public VKey<? extends ContactBase> createVKey()
Description copied from class:EppResource
Create the VKey for the specified EPP resource.- Specified by:
createVKey
in classEppResource
-
getContactId
public java.lang.String getContactId()
-
getLocalizedPostalInfo
public PostalInfo getLocalizedPostalInfo()
-
getInternationalizedPostalInfo
public PostalInfo getInternationalizedPostalInfo()
-
getSearchName
public java.lang.String getSearchName()
-
getVoiceNumber
public ContactPhoneNumber getVoiceNumber()
-
getFaxNumber
public ContactPhoneNumber getFaxNumber()
-
getEmailAddress
public java.lang.String getEmailAddress()
-
getAuthInfo
public ContactAuthInfo getAuthInfo()
-
getDisclose
public Disclose getDisclose()
-
getCurrentSponsorClientId
public java.lang.String getCurrentSponsorClientId()
-
getTransferData
public ContactTransferData getTransferData()
- Specified by:
getTransferData
in interfaceEppResource.ResourceWithTransferData
-
getLastTransferTime
public org.joda.time.DateTime getLastTransferTime()
Description copied from interface:EppResource.ResourceWithTransferData
The time that this resource was last transferred.Can be null if the resource has never been transferred.
- Specified by:
getLastTransferTime
in interfaceEppResource.ResourceWithTransferData
-
getForeignKey
public java.lang.String getForeignKey()
Description copied from class:EppResource
Get the foreign key string for this resource.- Specified by:
getForeignKey
in classEppResource
-
getPostalInfosAsList
public com.google.common.collect.ImmutableList<PostalInfo> getPostalInfosAsList()
Postal info for the contact.The XML marshalling expects the
PostalInfo
objects in a list, but we can't actually persist them to Datastore that way because Objectify can't handle collections of embedded objects that themselves contain collections, and there's a list of streets inside. This method transforms the persisted format to the XML format for marshalling.
-
cloneProjectedAtTime
public ContactBase cloneProjectedAtTime(org.joda.time.DateTime now)
Description copied from class:EppResource
Return a clone of the resource with timed status values modified using the given time.- Specified by:
cloneProjectedAtTime
in classEppResource
-
cloneContactProjectedAtTime
protected static <T extends ContactBase> T cloneContactProjectedAtTime(T contact, org.joda.time.DateTime now)
Clones the contact (or subclass). A separate static method so that we can pass in and return a T without the compiler complaining.
-
asBuilder
public ContactBase.Builder asBuilder()
Description copied from class:EppResource
Override ofBuildable.asBuilder()
so that the extra methods are visible.- Specified by:
asBuilder
in interfaceBuildable
- Specified by:
asBuilder
in classEppResource
-
-