mirror of
https://github.com/google/nomulus
synced 2026-02-10 06:50:30 +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:
@@ -21,7 +21,7 @@ import com.google.common.flogger.FluentLogger;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.contact.ContactResource;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.DomainBase;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.model.rde.RdeMode;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
@@ -123,15 +123,15 @@ public final class RdeMarshaller implements Serializable {
|
||||
ContactResourceToXjcConverter.convert(contact));
|
||||
}
|
||||
|
||||
/** Turns {@link DomainResource} object into an XML fragment. */
|
||||
public DepositFragment marshalDomain(DomainResource domain, RdeMode mode) {
|
||||
/** Turns {@link DomainBase} object into an XML fragment. */
|
||||
public DepositFragment marshalDomain(DomainBase domain, RdeMode mode) {
|
||||
return marshalResource(RdeResourceType.DOMAIN, domain,
|
||||
DomainResourceToXjcConverter.convert(domain, mode));
|
||||
DomainBaseToXjcConverter.convert(domain, mode));
|
||||
}
|
||||
|
||||
/** Turns {@link HostResource} object into an XML fragment. */
|
||||
public DepositFragment marshalSubordinateHost(
|
||||
HostResource host, DomainResource superordinateDomain) {
|
||||
HostResource host, DomainBase superordinateDomain) {
|
||||
return marshalResource(RdeResourceType.HOST, host,
|
||||
HostResourceToXjcConverter.convertSubordinate(host, superordinateDomain));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user