Package com.yahoo.document.annotation
Class AnnotationReferenceDataType
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.document.DataType
-
- com.yahoo.document.annotation.AnnotationReferenceDataType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<DataType>
public class AnnotationReferenceDataType extends DataType
A data type describing a field value having a reference to an annotation of a given type.- Author:
- Einar M R Rosenvinge
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotationReferenceDataType()
Creates an AnnotationReferenceDataType. WARNING! Do not use!AnnotationReferenceDataType(AnnotationType aType)
Creates an AnnotationReferenceDataType with a generated id.AnnotationReferenceDataType(AnnotationType aType, int id)
Creates an AnnotationReferenceDataType with a given id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldValue
createFieldValue()
Creates a new, empty FieldValue of this typeAnnotationType
getAnnotationType()
Returns the annotation type of this AnnotationReferenceDataType.java.lang.Class
getValueClass()
boolean
isValueCompatible(FieldValue value)
protected void
setAnnotationType(AnnotationType type)
Sets the annotation type that this AnnotationReferenceDataType points to. WARNING! Do not use.-
Methods inherited from class com.yahoo.document.DataType
buildFieldPath, clone, compareTo, createByReflection, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getPrimitiveType, getTensor, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isMultivalue, isRegistered, lastPredefinedDataTypeId, register, register, setId, setName, toString, visitMembers
-
-
-
-
Constructor Detail
-
AnnotationReferenceDataType
public AnnotationReferenceDataType(AnnotationType aType)
Creates an AnnotationReferenceDataType with a generated id.- Parameters:
aType
- the annotation type that AnnotationRefs shall refer to.
-
AnnotationReferenceDataType
public AnnotationReferenceDataType(AnnotationType aType, int id)
Creates an AnnotationReferenceDataType with a given id.- Parameters:
aType
- the annotation type that AnnotationRefs shall refer to.id
- the id to use
-
AnnotationReferenceDataType
protected AnnotationReferenceDataType()
Creates an AnnotationReferenceDataType. WARNING! Do not use!
-
-
Method Detail
-
createFieldValue
public FieldValue createFieldValue()
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classDataType
-
getValueClass
public java.lang.Class getValueClass()
- Specified by:
getValueClass
in classDataType
-
isValueCompatible
public boolean isValueCompatible(FieldValue value)
- Specified by:
isValueCompatible
in classDataType
-
getAnnotationType
public AnnotationType getAnnotationType()
Returns the annotation type of this AnnotationReferenceDataType.- Returns:
- the annotation type of this AnnotationReferenceDataType.
-
setAnnotationType
protected void setAnnotationType(AnnotationType type)
Sets the annotation type that this AnnotationReferenceDataType points to. WARNING! Do not use.- Parameters:
type
- the annotation type of this AnnotationReferenceDataType.
-
-