mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
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:
parent
8d97fa5858
commit
780a5add78
14 changed files with 5 additions and 148 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue