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:
Cloneable, 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
  • Constructor Details

    • 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 Details

    • createFieldValue

      public FieldValue createFieldValue()
      Description copied from class: DataType
      Creates a new, empty FieldValue of this type
      Specified by:
      createFieldValue in class DataType
    • getValueClass

      public Class getValueClass()
      Specified by:
      getValueClass in class DataType
    • isValueCompatible

      public boolean isValueCompatible(FieldValue value)
      Specified by:
      isValueCompatible in class DataType
    • 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.