Package com.yahoo.document.update
Class MapValueUpdate
- java.lang.Object
-
- com.yahoo.document.update.ValueUpdate
-
- com.yahoo.document.update.MapValueUpdate
-
public class MapValueUpdate extends ValueUpdate
Value update that represents performing an encapsulated value update on a subvalue. Currently, there are two multi-value data types in Vespa, array and weighted set.
- For an array, the value must be an Integer, and the update must represent a legal operation on the subtype of the array.
- For a weighted set, the value must be a key of the same type as the subtype of the weighted set, and the update must represent a legal operation on an integer value.
- Author:
- Einar M R Rosenvinge
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.yahoo.document.update.ValueUpdate
ValueUpdate.ValueUpdateClassID
-
-
Field Summary
Fields Modifier and Type Field Description protected ValueUpdate
update
protected FieldValue
value
-
Fields inherited from class com.yahoo.document.update.ValueUpdate
valueUpdateClassID
-
-
Constructor Summary
Constructors Constructor Description MapValueUpdate(FieldValue value, ValueUpdate update)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldValue
applyTo(FieldValue fval)
protected void
checkCompatibility(DataType fieldType)
boolean
equals(java.lang.Object o)
ValueUpdate
getUpdate()
FieldValue
getValue()
Returns the key of the nested updateint
hashCode()
void
serialize(DocumentUpdateWriter data, DataType superType)
void
setValue(FieldValue value)
Sets the key of the nested updatejava.lang.String
toString()
-
Methods inherited from class com.yahoo.document.update.ValueUpdate
createAdd, createAdd, createAddAll, createAddAll, createAssign, createClear, createDecrement, createDecrement, createDivide, createDivide, createIncrement, createIncrement, createMap, createMultiply, createMultiply, createRemove, createRemoveAll, createRemoveAll, getValueUpdateClassID
-
-
-
-
Field Detail
-
value
protected FieldValue value
-
update
protected ValueUpdate update
-
-
Constructor Detail
-
MapValueUpdate
public MapValueUpdate(FieldValue value, ValueUpdate update)
-
-
Method Detail
-
getValue
public FieldValue getValue()
Returns the key of the nested update- Specified by:
getValue
in classValueUpdate
-
setValue
public void setValue(FieldValue value)
Sets the key of the nested update- Specified by:
setValue
in classValueUpdate
-
getUpdate
public ValueUpdate getUpdate()
-
applyTo
public FieldValue applyTo(FieldValue fval)
- Specified by:
applyTo
in classValueUpdate
-
checkCompatibility
protected void checkCompatibility(DataType fieldType)
- Specified by:
checkCompatibility
in classValueUpdate
-
serialize
public void serialize(DocumentUpdateWriter data, DataType superType)
- Specified by:
serialize
in classValueUpdate
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classValueUpdate
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classValueUpdate
-
toString
public java.lang.String toString()
- Overrides:
toString
in classValueUpdate
-
-