Class CollectionDataType

java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.document.DataType
com.yahoo.document.CollectionDataType
All Implemented Interfaces:
Cloneable, Comparable<DataType>
Direct Known Subclasses:
ArrayDataType, WeightedSetDataType

public abstract class CollectionDataType extends DataType
Author:
Einar M R Rosenvinge
  • Field Details

    • classId

      public static int classId
  • Constructor Details

    • CollectionDataType

      protected CollectionDataType(String name, int code, DataType nestedType)
  • Method Details

    • createFieldValue

      public abstract CollectionFieldValue<?> createFieldValue()
      Description copied from class: DataType
      Creates a new, empty FieldValue of this type
      Specified by:
      createFieldValue in class DataType
    • clone

      public CollectionDataType clone()
      Overrides:
      clone in class DataType
    • getNestedType

      public DataType getNestedType()
    • createByReflection

      protected FieldValue createByReflection(Object arg)
      Description copied from class: DataType
      Creates a field value by reflection
      Overrides:
      createByReflection in class DataType
      Parameters:
      arg - the value of the newly created field value
      Returns:
      a fully constructed value
    • getPrimitiveType

      public PrimitiveDataType getPrimitiveType()
      Description copied from class: DataType
      Returns the primitive datatype associated with this datatype, i.e. the type itself if this is a PrimitiveDataType, the nested type if this is a CollectionDataType or null for all other cases
      Overrides:
      getPrimitiveType in class DataType
      Returns:
      primitive data type, or null
    • isValueCompatible

      public boolean isValueCompatible(FieldValue value)
      Specified by:
      isValueCompatible in class DataType
    • register

      protected void register(DocumentTypeManager manager, List<DataType> seenTypes)
      Overrides:
      register in class DataType
    • visitMembers

      public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
      Overrides:
      visitMembers in class DataType
    • isMultivalue

      public boolean isMultivalue()
      Description copied from class: DataType
      Returns whether this is a multivalue type, i.e either a CollectionDataType or a MapDataType
      Overrides:
      isMultivalue in class DataType