public class ReferenceDataType extends DataType
ReferenceDataType
specifies a particular concrete document type that a
ReferenceFieldValue
instance binds to.Modifier and Type | Field and Description |
---|---|
static int |
classId |
private StructuredDataType |
targetType |
Modifier | Constructor and Description |
---|---|
|
ReferenceDataType(DocumentType targetType,
int id) |
private |
ReferenceDataType(StructuredDataType targetType) |
private |
ReferenceDataType(StructuredDataType targetType,
int id) |
|
ReferenceDataType(TemporaryStructuredDataType temporaryTargetType,
int id)
Constructor used when building a multi document type model where the concrete instance
of the target document type might not yet be known.
|
Modifier and Type | Method and Description |
---|---|
private static String |
buildTypeName(StructuredDataType targetType) |
ReferenceFieldValue |
createFieldValue()
Creates a new, empty FieldValue of this type
|
static ReferenceDataType |
createWithInferredId(DocumentType targetType)
Creates a new type where the numeric ID is based on the hash of targetType
|
static ReferenceDataType |
createWithInferredId(TemporaryStructuredDataType targetType)
Creates a new type where the numeric ID is based on the hash of targetType
|
StructuredDataType |
getTargetType() |
Class<? extends ReferenceFieldValue> |
getValueClass() |
boolean |
isValueCompatible(FieldValue value) |
void |
setTargetType(StructuredDataType targetType)
Overrides the stored temporary data type with a concrete StructuredDataType instance.
|
buildFieldPath, clone, compareTo, createByReflection, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, register, setId, setName, setRegistered, skipDotInString, toString, visitMembers
public static final int classId
private StructuredDataType targetType
public ReferenceDataType(DocumentType targetType, int id)
public ReferenceDataType(TemporaryStructuredDataType temporaryTargetType, int id)
private ReferenceDataType(StructuredDataType targetType, int id)
private ReferenceDataType(StructuredDataType targetType)
private static String buildTypeName(StructuredDataType targetType)
public static ReferenceDataType createWithInferredId(DocumentType targetType)
public static ReferenceDataType createWithInferredId(TemporaryStructuredDataType targetType)
public StructuredDataType getTargetType()
public void setTargetType(StructuredDataType targetType)
IllegalStateException
- if the previously stored target type is already a concrete
instance (not TemporaryStructuredDataType).public ReferenceFieldValue createFieldValue()
DataType
createFieldValue
in class DataType
public Class<? extends ReferenceFieldValue> getValueClass()
getValueClass
in class DataType
public boolean isValueCompatible(FieldValue value)
isValueCompatible
in class DataType
Copyright © 2017. All rights reserved.