summaryrefslogtreecommitdiffstats
path: root/document/src/main/java/com/yahoo/document/ReferenceDataType.java
diff options
context:
space:
mode:
Diffstat (limited to 'document/src/main/java/com/yahoo/document/ReferenceDataType.java')
-rw-r--r--document/src/main/java/com/yahoo/document/ReferenceDataType.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/document/src/main/java/com/yahoo/document/ReferenceDataType.java b/document/src/main/java/com/yahoo/document/ReferenceDataType.java
index c3b5f6590b6..8cf6b665acf 100644
--- a/document/src/main/java/com/yahoo/document/ReferenceDataType.java
+++ b/document/src/main/java/com/yahoo/document/ReferenceDataType.java
@@ -22,16 +22,6 @@ public class ReferenceDataType extends DataType {
this((StructuredDataType)targetType, id);
}
- /**
- * Constructor used when building a multi document type model where the concrete instance
- * of the target document type might not yet be known. The temporary data type should be
- * replaced later using setTargetType().
- */
- @SuppressWarnings("deprecation")
- public ReferenceDataType(TemporaryStructuredDataType temporaryTargetType, int id) {
- this((StructuredDataType) temporaryTargetType, id);
- }
-
private ReferenceDataType(StructuredDataType targetType, int id) {
super(buildTypeName(targetType), id);
this.targetType = targetType;
@@ -52,34 +42,8 @@ public class ReferenceDataType extends DataType {
return new ReferenceDataType(targetType);
}
- /**
- * Creates a new type where the numeric ID is based on the hash of targetType
- */
- @SuppressWarnings("deprecation")
- public static ReferenceDataType createWithInferredId(TemporaryStructuredDataType targetType) {
- return new ReferenceDataType(targetType);
- }
-
public StructuredDataType getTargetType() { return targetType; }
- /**
- * Overrides the stored temporary data type with a concrete StructuredDataType instance. Should only
- * be invoked from configuration or model code when resolving temporary types.
- *
- * @throws IllegalStateException if the previously stored target type is already a concrete
- * instance (not TemporaryStructuredDataType).
- */
- @SuppressWarnings("deprecation")
- public void setTargetType(StructuredDataType targetType) {
- if (! (this.targetType instanceof TemporaryStructuredDataType)) {
- throw new IllegalStateException(String.format(
- "Unexpected attempt to replace already concrete target " +
- "type in ReferenceDataType instance (type is '%s')", this.targetType.getName()));
- }
- this.targetType = targetType;
- setName(buildTypeName(targetType));
- }
-
@Override
public ReferenceFieldValue createFieldValue() {
return new ReferenceFieldValue(this);