mirror of
https://github.com/google/nomulus
synced 2026-05-20 06:41:51 +00:00
Scope down lastTransferTime to only ContactResource, DomainResource
and HostResource. DomainApplication is not transferable and has no need for this field. HostResource needs it because it can be transferred with a domain. This is all in service of removing the ofy().load() inside of host's cloneProjectedAtTime. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139346925
This commit is contained in:
@@ -162,6 +162,14 @@ public class DomainResource extends DomainBase
|
||||
@XmlTransient
|
||||
TransferData transferData;
|
||||
|
||||
/**
|
||||
* The time that this resource was last transferred.
|
||||
*
|
||||
* <p>Can be null if the resource has never been transferred.
|
||||
*/
|
||||
@XmlElement(name = "trDate")
|
||||
DateTime lastTransferTime;
|
||||
|
||||
public ImmutableSet<String> getSubordinateHosts() {
|
||||
return nullToEmptyImmutableCopy(subordinateHosts);
|
||||
}
|
||||
@@ -203,6 +211,11 @@ public class DomainResource extends DomainBase
|
||||
return Optional.fromNullable(transferData).or(TransferData.EMPTY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateTime getLastTransferTime() {
|
||||
return lastTransferTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getForeignKey() {
|
||||
return fullyQualifiedDomainName;
|
||||
@@ -462,5 +475,12 @@ public class DomainResource extends DomainBase
|
||||
getInstance().transferData = transferData;
|
||||
return thisCastToDerived();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder setLastTransferTime(DateTime lastTransferTime) {
|
||||
getInstance().lastTransferTime = lastTransferTime;
|
||||
return thisCastToDerived();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user