Package com.yahoo.document
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
- Author:
- Einar M R Rosenvinge
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
CollectionDataType
(String name, int code, DataType nestedType) -
Method Summary
Modifier and TypeMethodDescriptionclone()
protected FieldValue
createByReflection
(Object arg) Creates a field value by reflectionabstract CollectionFieldValue<?>
Creates a new, empty FieldValue of this typeReturns the primitive datatype associated with this datatype, i.e.boolean
Returns whether this is a multivalue type, i.e either a CollectionDataType or a MapDataTypeboolean
isValueCompatible
(FieldValue value) protected void
register
(DocumentTypeManager manager, List<DataType> seenTypes) void
visitMembers
(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.document.DataType
buildFieldPath, compareTo, createFieldValue, equals, getArray, getCode, getId, getMap, getName, getTensor, getValueClass, getWeightedSet, getWeightedSet, hashCode, isAssignableFrom, isRegistered, lastPredefinedDataTypeId, register, setId, setName, toString
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onDeserialize, onGetClassId, onSerialize, putUtf8, registerClass, serialize, serializeOptional, serializeWithId
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static int classId
-
-
Constructor Details
-
CollectionDataType
-
-
Method Details
-
createFieldValue
Description copied from class:DataType
Creates a new, empty FieldValue of this type- Specified by:
createFieldValue
in classDataType
-
clone
-
getNestedType
-
createByReflection
Description copied from class:DataType
Creates a field value by reflection- Overrides:
createByReflection
in classDataType
- Parameters:
arg
- the value of the newly created field value- Returns:
- a fully constructed value
-
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 classDataType
- Returns:
- primitive data type, or null
-
isValueCompatible
- Specified by:
isValueCompatible
in classDataType
-
register
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembers
in classDataType
-
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 classDataType
-