Package com.yahoo.searchlib.expression
Class AttributeNode
java.lang.Object
com.yahoo.vespa.objects.Selectable
com.yahoo.vespa.objects.Identifiable
com.yahoo.searchlib.expression.ExpressionNode
com.yahoo.searchlib.expression.FunctionNode
com.yahoo.searchlib.expression.AttributeNode
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
AttributeMapLookupNode
This function is an instruction to retrieve the value of a named attribute.
- Author:
- baldersheim, Simon Thoresen Hult
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructs an empty result node.AttributeNode
(String attribute) Constructs an instance of this class with given attribute name. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Returns the name of the attribute whose value this function is to retrieve.int
hashCode()
protected void
onDeserialize
(com.yahoo.vespa.objects.Deserializer buf) protected int
protected void
onSerialize
(com.yahoo.vespa.objects.Serializer buf) setAttributeName
(String attribute) Sets the name of the attribute whose value this function is to retrieve.void
visitMembers
(com.yahoo.vespa.objects.ObjectVisitor visitor) Methods inherited from class com.yahoo.searchlib.expression.FunctionNode
clone, equalsExpression, getResult, setResult
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, onExecute, onPrepare, prepare
Methods inherited from class com.yahoo.vespa.objects.Identifiable
create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getRawUtf8Bytes, getUtf8, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString
Methods inherited from class com.yahoo.vespa.objects.Selectable
select, select, selectMembers
-
Field Details
-
classId
public static final int classId
-
-
Constructor Details
-
AttributeNode
public AttributeNode()Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set. -
AttributeNode
Constructs an instance of this class with given attribute name.- Parameters:
attribute
- The attribute to retrieve.
-
-
Method Details
-
getAttributeName
Returns the name of the attribute whose value this function is to retrieve.- Returns:
- The attribute name.
-
setAttributeName
Sets the name of the attribute whose value this function is to retrieve.- Parameters:
attribute
- The attribute to retrieve.- Returns:
- This, to allow chaining.
-
onGetClassId
protected int onGetClassId()- Overrides:
onGetClassId
in classFunctionNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf) - Overrides:
onSerialize
in classFunctionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf) - Overrides:
onDeserialize
in classFunctionNode
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
equalsFunction
- Specified by:
equalsFunction
in classFunctionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor) - Overrides:
visitMembers
in classFunctionNode
-