Package google.registry.model.reporting
Class HistoryEntry
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.reporting.HistoryEntry
-
- All Implemented Interfaces:
Buildable
,DatastoreEntity
,java.lang.Cloneable
- Direct Known Subclasses:
ContactHistory
,DomainHistory
,HostHistory
@MappedSuperclass public class HistoryEntry extends ImmutableObject implements Buildable, DatastoreEntity
A record of an EPP command that mutated a resource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HistoryEntry.Builder<T extends HistoryEntry,B extends HistoryEntry.Builder<?,?>>
A builder forHistoryEntry
since it is immutablestatic class
HistoryEntry.Type
Represents the type of history entry.-
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 Modifier and Type Field Description protected java.util.Set<DomainTransactionRecord>
domainTransactionRecords
Logging field for transaction reporting.java.lang.Long
id
The autogenerated id of this event.protected com.googlecode.objectify.Key<? extends EppResource>
parent
The resource this event mutated.-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description HistoryEntry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HistoryEntry.Builder
asBuilder()
HistoryEntry
asHistoryEntry()
static VKey<? extends HistoryEntry>
createVKey(com.googlecode.objectify.Key<HistoryEntry> key)
Creates aVKey
instance from aKey
instance.boolean
getBySuperuser()
java.lang.String
getClientId()
java.util.Set<DomainTransactionRecord>
getDomainTransactionRecords()
long
getId()
org.joda.time.DateTime
getModificationTime()
java.lang.String
getOtherClientId()
com.googlecode.objectify.Key<? extends EppResource>
getParent()
Period
getPeriod()
java.lang.String
getReason()
java.lang.Boolean
getRequestedByRegistrar()
Trid
getTrid()
Returns the TRID, which may be null if the entry was not created by a normal flow.HistoryEntry.Type
getType()
byte[]
getXmlBytes()
HistoryEntry
toChildHistoryEntity()
java.util.Optional<SqlEntity>
toSqlEntity()
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Field Detail
-
id
public java.lang.Long id
The autogenerated id of this event. Note that, this field is marked asTransient
in the SQL schema, this is because the child class ofHistoryEntry
, e.g.DomainHistory
, uses a composite primary key which the id is part of, and Hibernate requires that all theId
fields must be put in the exact same class.
-
parent
protected com.googlecode.objectify.Key<? extends EppResource> parent
The resource this event mutated.
-
domainTransactionRecords
@EmptySetToNull protected java.util.Set<DomainTransactionRecord> domainTransactionRecords
Logging field for transaction reporting.This will be empty for any HistoryEntry generated before this field was added. This will also be empty if the HistoryEntry refers to an EPP mutation that does not affect domain transaction counts (such as contact or host mutations).
-
-
Method Detail
-
getId
public long getId()
-
getParent
public com.googlecode.objectify.Key<? extends EppResource> getParent()
-
getType
public HistoryEntry.Type getType()
-
getPeriod
public Period getPeriod()
-
getXmlBytes
public byte[] getXmlBytes()
-
getModificationTime
public org.joda.time.DateTime getModificationTime()
-
getClientId
public java.lang.String getClientId()
-
getOtherClientId
public java.lang.String getOtherClientId()
-
getTrid
@Nullable public Trid getTrid()
Returns the TRID, which may be null if the entry was not created by a normal flow.
-
getBySuperuser
public boolean getBySuperuser()
-
getReason
public java.lang.String getReason()
-
getRequestedByRegistrar
public java.lang.Boolean getRequestedByRegistrar()
-
getDomainTransactionRecords
public java.util.Set<DomainTransactionRecord> getDomainTransactionRecords()
-
asBuilder
public HistoryEntry.Builder asBuilder()
-
asHistoryEntry
public HistoryEntry asHistoryEntry()
-
toChildHistoryEntity
public HistoryEntry toChildHistoryEntity()
-
toSqlEntity
public java.util.Optional<SqlEntity> toSqlEntity()
- Specified by:
toSqlEntity
in interfaceDatastoreEntity
-
createVKey
public static VKey<? extends HistoryEntry> createVKey(com.googlecode.objectify.Key<HistoryEntry> key)
Creates aVKey
instance from aKey
instance.
-
-