Package com.yahoo.searchlib.expression
Class InterpolatedLookupNode
- 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.MultiArgFunctionNode
-
- com.yahoo.searchlib.expression.UnaryFunctionNode
-
- com.yahoo.searchlib.expression.InterpolatedLookupNode
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class InterpolatedLookupNode extends UnaryFunctionNode
This function is an instruction to retrieve the value of a named attribute.- Author:
- arnej27959
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description InterpolatedLookupNode()
Constructs an empty result node.InterpolatedLookupNode(String attribute, ExpressionNode arg)
Constructs an instance of this class with given attribute name and lookup argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equalsUnaryFunction(UnaryFunctionNode obj)
String
getAttributeName()
Returns the name of the attribute whose value we do lookup in.int
hashCode()
protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
InterpolatedLookupNode
setAttributeName(String attribute)
Sets the name of the attribute whose value we do lookup in.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.expression.UnaryFunctionNode
equalsMultiArgFunction, getArg, onPrepare, onPrepareResult
-
Methods inherited from class com.yahoo.searchlib.expression.MultiArgFunctionNode
addArg, clone, equalsFunction, getArg, getNumArgs, onCalculate, onExecute, selectMembers
-
Methods inherited from class com.yahoo.searchlib.expression.FunctionNode
equalsExpression, getResult, setResult
-
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, prepare
-
-
-
-
Constructor Detail
-
InterpolatedLookupNode
public InterpolatedLookupNode()
Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set.
-
InterpolatedLookupNode
public InterpolatedLookupNode(String attribute, ExpressionNode arg)
Constructs an instance of this class with given attribute name and lookup argument.- Parameters:
attribute
- The attribute to retrieve.arg
- Expression evaluating to the lookup argument.
-
-
Method Detail
-
getAttributeName
public String getAttributeName()
Returns the name of the attribute whose value we do lookup in.- Returns:
- The attribute name.
-
setAttributeName
public InterpolatedLookupNode setAttributeName(String attribute)
Sets the name of the attribute whose value we do lookup in.- Parameters:
attribute
- The attribute to retrieve.- Returns:
- This, to allow chaining.
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classUnaryFunctionNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classMultiArgFunctionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classMultiArgFunctionNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMultiArgFunctionNode
-
equalsUnaryFunction
protected boolean equalsUnaryFunction(UnaryFunctionNode obj)
- Specified by:
equalsUnaryFunction
in classUnaryFunctionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classMultiArgFunctionNode
-
-