aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/documentmodel
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-03-17 10:09:46 +0000
committerArne H Juul <arnej@yahooinc.com>2022-03-17 10:09:46 +0000
commitda2394528ea86f38bb2d00bbbe09142ac61d0faf (patch)
treeeff5edd9ad715ae8f5900f416df0e671c9fe4e2c /config-model/src/main/java/com/yahoo/documentmodel
parent66cd9e646c66b255d2259ec39a72f5b3fd8ce100 (diff)
switch to NewDocumentReferenceDataType
Diffstat (limited to 'config-model/src/main/java/com/yahoo/documentmodel')
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
index 4ff54d7ff1c..a6571ef819d 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
@@ -4,7 +4,7 @@ package com.yahoo.documentmodel;
import com.yahoo.document.DataType;
import com.yahoo.document.Document;
import com.yahoo.document.Field;
-import com.yahoo.document.ReferenceDataType;
+import com.yahoo.documentmodel.NewDocumentReferenceDataType;
import com.yahoo.document.StructDataType;
import com.yahoo.document.StructuredDataType;
import com.yahoo.document.TemporaryStructuredDataType;
@@ -385,16 +385,12 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
}
- private ReferenceDataType refToThis = null;
+ private NewDocumentReferenceDataType refToThis = null;
@SuppressWarnings("deprecation")
- public ReferenceDataType getReferenceDataType() {
+ public NewDocumentReferenceDataType getReferenceDataType() {
if (refToThis == null) {
- // super ugly, the APIs for this are horribly inconsistent
- var tmptmp = TemporaryStructuredDataType.create(getName());
- var tmp = ReferenceDataType.createWithInferredId(tmptmp);
- tmp.setTargetType((StructuredDataType) this);
- refToThis = tmp;
+ refToThis = new NewDocumentReferenceDataType(this);
}
return refToThis;
}