Package com.yahoo.document.datatypes
Class Struct
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.document.datatypes.FieldValue
com.yahoo.document.datatypes.CompositeFieldValue
com.yahoo.document.datatypes.StructuredFieldValue
com.yahoo.document.datatypes.Struct
- All Implemented Interfaces:
Cloneable,Comparable<FieldValue>
- Author:
- HÃ¥kon Humberset
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAssign this non-fieldvalue value to this field value.voidClears this and assigns from the givenStructuredFieldValuevoidclear()clone()intcompareTo(FieldValue obj) voiddeserialize(Field field, FieldReader reader) Read a field value from the specified readerprotected voiddoSetFieldValue(Field field, FieldValue value) booleanReturns the named field object, or null if that field does not exist.intstatic <T> TgetFieldValue(FieldValue struct, DataType structType, Field field, Class<T> fieldType) static <T> TgetFieldValue(FieldValue struct, DataType structType, String fieldName, Class<T> fieldType) getFieldValue(Field field) Returns the value of the given field.intinthashCode()iterator()voidDeprecated.removeFieldValue(Field field) Removes and returns a field value.voidserialize(Field field, FieldWriter writer) Write out field value to the specified writervoidsetVersion(int version) toString()Methods inherited from class com.yahoo.document.datatypes.StructuredFieldValue
getFieldValue, isGenerated, iterateNested, removeFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValue, setFieldValueMethods inherited from class com.yahoo.document.datatypes.CompositeFieldValue
setDataTypeMethods inherited from class com.yahoo.document.datatypes.FieldValue
create, deserialize, getRecursiveValue, getRecursiveValue, getWrappedValue, onDeserialize, onSerialize, serialize, toXmlMethods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, onGetClassId, putUtf8, registerClass, registerClass, serialize, serializeOptional, serializeWithId, visitMembersMethods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
Struct
-
-
Method Details
-
getDataType
- Overrides:
getDataTypein classStructuredFieldValue
-
setVersion
public void setVersion(int version) -
getVersion
public int getVersion() -
clone
- Overrides:
clonein classFieldValue
-
clear
public void clear()- Specified by:
clearin classStructuredFieldValue
-
iterator
- Specified by:
iteratorin classStructuredFieldValue
-
getFields
-
printXml
Deprecated.- Specified by:
printXmlin classFieldValue
-
getFieldValue
Description copied from class:StructuredFieldValueReturns the value of the given field. If the field does not exist, this method returns null.- Specified by:
getFieldValuein classStructuredFieldValue- Parameters:
field- The field whose value to return.- Returns:
- The value of the field, or null.
-
getField
Description copied from class:StructuredFieldValueReturns the named field object, or null if that field does not exist.- Specified by:
getFieldin classStructuredFieldValue- Parameters:
fieldName- The name of the field to return.- Returns:
- The corresponding field, or null.
-
getFieldCount
public int getFieldCount()- Specified by:
getFieldCountin classStructuredFieldValue
-
doSetFieldValue
- Specified by:
doSetFieldValuein classStructuredFieldValue
-
removeFieldValue
Description copied from class:StructuredFieldValueRemoves and returns a field value.- Specified by:
removeFieldValuein classStructuredFieldValue- Parameters:
field- The field whose value to remove.- Returns:
- The previous value of the field, or null.
-
assign
Description copied from class:FieldValueAssign this non-fieldvalue value to this field value. This is used to be able to assign ints to Integer field values and List to Array field values and such.Override to accept the specific types that should be legal.
- Specified by:
assignin classFieldValue
-
assignFrom
Clears this and assigns from the givenStructuredFieldValue -
equals
- Overrides:
equalsin classCompositeFieldValue
-
hashCode
public int hashCode()- Overrides:
hashCodein classCompositeFieldValue
-
toString
- Overrides:
toStringin classcom.yahoo.vespa.objects.Identifiable
-
serialize
Description copied from class:FieldValueWrite out field value to the specified writer- Specified by:
serializein classFieldValue
-
compareTo
- Specified by:
compareToin interfaceComparable<FieldValue>- Overrides:
compareToin classFieldValue
-
deserialize
Description copied from class:FieldValueRead a field value from the specified reader- Specified by:
deserializein classFieldValue
-
getFieldValue
public static <T> T getFieldValue(FieldValue struct, DataType structType, String fieldName, Class<T> fieldType) -
getFieldValue
public static <T> T getFieldValue(FieldValue struct, DataType structType, Field field, Class<T> fieldType)
-