Package google.registry.model
Class ImmutableObject
java.lang.Object
google.registry.model.ImmutableObject
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
Address
,AllocationTokenExtension
,AuthInfo
,AuthInfo.PasswordAuth
,BaseDomainLabelList
,BaseFee
,BaseTransferObject
,BillingBase
,BulkPricingPackage
,BulkTokenExtension
,BulkTokenResponseExtension
,CheckData
,CheckData.Check
,CheckData.CheckNameOrID
,ClaimsList
,CommonMarkContactFields
,CommonMarkFields
,ConsoleUpdateHistory
,ContactCommand.ContactCreateOrChange
,CreateAutoTimestamp
,CrossTldSingleton
,Cursor.CursorId
,DesignatedContact
,Disclose
,Disclose.PostalInfoChoice
,DnsRefreshRequest
,DomainCommand.DomainCreateOrChange
,DomainCommand.Info
,DomainCommand.Info.NameWithHosts
,DomainDsDataBase
,DomainLabelEntry
,DomainObjectSpec
,DomainTransactionRecord
,EncodedSignedMark
,EppInput
,EppInput.CommandWrapper
,EppInput.InnerCommand
,EppInput.Options
,EppInput.Services
,EppOutput
,EppResponse
,FeatureFlag
,FeeCheckCommandExtensionV06
,FeeCheckCommandExtensionV11
,FeeCheckCommandExtensionV12
,FeeCheckResponseExtensionItemCommandV12
,FeeCheckResponseExtensionV06
,FeeCheckResponseExtensionV11
,FeeCheckResponseExtensionV12
,FeeExtensionCommandDescriptor
,FeeQueryCommandExtensionItem
,FeeQueryResponseExtensionItem
,FeesAndCredits
,FeeTransformCommandExtension
,FeeTransformResponseExtension
,ForeignKeyedDesignatedContact
,GracePeriodBase
,Greeting
,HistoryEntry
,HistoryEntry.HistoryEntryId
,IssuerInfo
,LaunchCheckExtension
,LaunchCheckResponseExtension
,LaunchCheckResponseExtension.LaunchCheck
,LaunchCheckResponseExtension.LaunchCheckName
,LaunchExtension
,LaunchNotice
,LaunchNotice.NoticeIdType
,LaunchPhase
,Lock
,Mark
,MarkProtection
,MessageQueueInfo
,MetadataExtension
,PendingActionNotificationResponse
,Period
,PhoneNumber
,PollMessage
,PostalInfo
,PresenceMarker
,RdeRevision.RdeRevisionId
,RegistrarPoc.RegistrarPocId
,RegistrarPocBase
,ResourceCommand.AbstractSingleResourceCommand
,ResourceCommand.ResourceCheck
,ResourceCommand.ResourceUpdate.AddRemove
,Result
,RgpInfoExtension
,RgpUpdateExtension
,SecDnsCreateExtension
,SecDnsInfoExtension
,SecDnsUpdateExtension
,SecDnsUpdateExtension.Add
,SecDnsUpdateExtension.Change
,SecDnsUpdateExtension.Remove
,SignedMark
,SignedMarkRevocationList
,Spec11ThreatMatch
,SuperuserExtension
,TimeOfYear
,Tld
,Trid
,UpdateAutoTimestamp
,UpdateAutoTimestampEntity
,UserRoles
,VKey
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Marker to indicate thattoHydratedString()
should not hydrate a field.protected static @interface
Marker to indicate that this filed should be ignored bytoDiffableFieldMap()
.static @interface
Indicates that the field does not take part in the immutability contract. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static <T extends ImmutableObject>
Tclone
(T t) Returns a clone of the given object.protected static <T extends ImmutableObject>
TcloneEmptyToNull
(T t) Returns a clone of the given object with empty fields set to null.VKey
<? extends ImmutableObject> boolean
Returns the map of significant fields (fields that we care about for purposes of comparison and display).int
hashCode()
Returns a map of all object fields (including sensitive data) that's used to produce diffs.Similar to toString(), with a full expansion of referenced keys, including in collections.toString()
Returns a string view of the object, formatted like:toStringHelper
(SortedMap<String, Object> fields)
-
Field Details
-
hashCode
-
-
Constructor Details
-
ImmutableObject
public ImmutableObject()
-
-
Method Details
-
getSignificantFields
Returns the map of significant fields (fields that we care about for purposes of comparison and display).Isolated into a method so that derived classes can override it.
-
equals
-
hashCode
public int hashCode() -
clone
Returns a clone of the given object. -
cloneEmptyToNull
Returns a clone of the given object with empty fields set to null. -
toString
Returns a string view of the object, formatted like:ModelObject (@12345): { field1=value1 field2=[a,b,c] field3=AnotherModelObject: { foo=bar } }
-
toHydratedString
Similar to toString(), with a full expansion of referenced keys, including in collections. -
toStringHelper
-
toDiffableFieldMap
Returns a map of all object fields (including sensitive data) that's used to produce diffs. -
createVKey
-