mirror of
https://github.com/google/nomulus
synced 2026-02-03 11:32:24 +00:00
Merge DomainResource into DomainBase
This eliminates the use of Objectify polymorphism for EPP resources entirely (yay!), which makes the Registry 3.0 database migration easier. It is unfortunate that the naming parallelism of EppResources is lost between ContactResource, HostResource, and DomainResource, but the actual type as far as Datastore was concerned was DomainBase all along, and it would be a much more substantial data migration to allow us to continue using the class name DomainResource now that we're no longer using Objectify polymorphism. This simply isn't worth it. This also removes the polymorphic Datastore indexes (which will no longer function as of this change). The non-polymorphic replacement indexes were added in [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=230930546
This commit is contained in:
@@ -31,7 +31,7 @@ import google.registry.model.EppResource;
|
||||
import google.registry.model.EppResource.ForeignKeyedEppResource;
|
||||
import google.registry.model.annotations.ExternalMessagingName;
|
||||
import google.registry.model.annotations.ReportedOn;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.transfer.TransferData;
|
||||
import java.net.InetAddress;
|
||||
import java.util.Optional;
|
||||
@@ -70,7 +70,7 @@ public class HostResource extends EppResource implements ForeignKeyedEppResource
|
||||
@Index
|
||||
@IgnoreSave(IfNull.class)
|
||||
@DoNotHydrate
|
||||
Key<DomainResource> superordinateDomain;
|
||||
Key<DomainBase> superordinateDomain;
|
||||
|
||||
/**
|
||||
* The time that this resource was last transferred.
|
||||
@@ -92,7 +92,7 @@ public class HostResource extends EppResource implements ForeignKeyedEppResource
|
||||
return fullyQualifiedHostName;
|
||||
}
|
||||
|
||||
public Key<DomainResource> getSuperordinateDomain() {
|
||||
public Key<DomainBase> getSuperordinateDomain() {
|
||||
return superordinateDomain;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class HostResource extends EppResource implements ForeignKeyedEppResource
|
||||
* the {@link #superordinateDomain} field. Passing it as a parameter allows the caller to
|
||||
* control the degree of consistency used to load it.
|
||||
*/
|
||||
public DateTime computeLastTransferTime(@Nullable DomainResource superordinateDomain) {
|
||||
public DateTime computeLastTransferTime(@Nullable DomainBase superordinateDomain) {
|
||||
if (!isSubordinate()) {
|
||||
checkArgument(superordinateDomain == null);
|
||||
return getLastTransferTime();
|
||||
@@ -195,7 +195,7 @@ public class HostResource extends EppResource implements ForeignKeyedEppResource
|
||||
difference(getInstance().getInetAddresses(), inetAddresses)));
|
||||
}
|
||||
|
||||
public Builder setSuperordinateDomain(Key<DomainResource> superordinateDomain) {
|
||||
public Builder setSuperordinateDomain(Key<DomainBase> superordinateDomain) {
|
||||
getInstance().superordinateDomain = superordinateDomain;
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user