Package google.registry.model.contact
Class ContactBase
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.UpdateAutoTimestampEntity
google.registry.model.EppResource
google.registry.model.contact.ContactBase
- All Implemented Interfaces:
Buildable
,EppResource.ResourceWithTransferData<ContactTransferData>
,UnsafeSerializable
,Serializable
,Cloneable
- Direct Known Subclasses:
Contact
@MappedSuperclass
@Embeddable
public class ContactBase
extends EppResource
implements EppResource.ResourceWithTransferData<ContactTransferData>
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ContactBase.Builder<T extends ContactBase,
B extends ContactBase.Builder<T, B>> A builder for constructingContact
, 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.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 inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionContactBase.Builder
<? extends ContactBase, ?> 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).cloneProjectedAtTime
(org.joda.time.DateTime now) Return a clone of the resource with timed status values modified using the given time.VKey
<? extends ContactBase> Create the VKey for the specified EPP resource.Get the foreign key string for this resource.org.joda.time.DateTime
The time that this resource was last transferred.com.google.common.collect.ImmutableList
<PostalInfo> Postal info for the contact.Methods inherited from class google.registry.model.EppResource
getCreationRegistrarId, getCreationTime, getDeletionTime, getLastEppUpdateRegistrarId, getLastEppUpdateTime, getPersistedCurrentSponsorRegistrarId, getRepoId, getStatusValues, loadCached, loadCached, setCacheForTest, setRepoId
Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
ContactBase
public ContactBase()
-
-
Method Details
-
createVKey
Description copied from class:EppResource
Create the VKey for the specified EPP resource.- Specified by:
createVKey
in classEppResource
-
getContactId
-
getLocalizedPostalInfo
-
getInternationalizedPostalInfo
-
getSearchName
-
getVoiceNumber
-
getFaxNumber
-
getEmailAddress
-
getAuthInfo
-
getDisclose
-
getCurrentSponsorRegistrarId
-
getTransferData
- Specified by:
getTransferData
in interfaceEppResource.ResourceWithTransferData<ContactTransferData>
-
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<ContactTransferData>
-
getForeignKey
Description copied from class:EppResource
Get the foreign key string for this resource.- Specified by:
getForeignKey
in classEppResource
-
getPostalInfosAsList
Postal info for the contact.The XML marshalling expects the
PostalInfo
objects in a list, but we can't actually persist them directly due to legacy reasons (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
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
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
-