Get rid of ReferenceUnions entirely

This is the third and final phase in the migration away from ReferenceUnions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138778148
This commit is contained in:
mcilwain 2016-11-10 10:46:16 -08:00 committed by Ben McIlwain
parent 8d97fa5858
commit 780a5add78
14 changed files with 5 additions and 148 deletions

View file

@ -26,7 +26,6 @@ import com.google.common.collect.FluentIterable;
import com.google.common.collect.Maps;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Ignore;
import google.registry.model.domain.ReferenceUnion;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@ -145,9 +144,7 @@ public abstract class ImmutableObject implements Cloneable {
new Function<Object, Object>() {
@Override
public Object apply(Object value) {
if (value instanceof ReferenceUnion) {
return apply(((ReferenceUnion<?>) value).getLinked());
} else if (value instanceof Key) {
if (value instanceof Key) {
return apply(ofy().load().key((Key<?>) value).now());
} else if (value instanceof Map) {
return transformValues((Map<?, ?>) value, this);