Package jadex.javaparser.javaccimpl
Class SelectNode
- java.lang.Object
- 
- jadex.javaparser.javaccimpl.SimpleNode
- 
- jadex.javaparser.javaccimpl.ExpressionNode
- 
- jadex.javaparser.javaccimpl.SelectNode
 
 
 
- 
- All Implemented Interfaces:
- IParsedExpression,- Node,- java.io.Serializable
 
 public class SelectNode extends ExpressionNode Node for OQL like select statements.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intALLThe selection mode for returning a set of elements (default).static intANYThe selection mode for returning the first matching element.static intASCThe ascending order direction.static intDESCThe descending order direction.static intIOTAThe selection mode for returning a single matching element.protected intmodeThe selection mode.protected intorderThe order direction.protected booleanorderbyThe flag indicating presence of an order by clause.protected java.lang.String[]varsThe variable names.protected booleanwhereThe flag indicating presence of a where clause.- 
Fields inherited from class jadex.javaparser.javaccimpl.ExpressionNodeconstant, constant_value, expressiontext, imports, static_type, text
 - 
Fields inherited from class jadex.javaparser.javaccimpl.SimpleNodechildren, id, parent
 
- 
 - 
Constructor SummaryConstructors Constructor Description SelectNode(jadex.javaparser.javaccimpl.ParserImpl p, int id)Create a node.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Test if two nodes are equal.static intfromString(java.lang.String mode)Convert a selection mode from a string representation.ParameterNode[]getUnboundParameterNodes()Get unbound parameter nodes.java.lang.ObjectgetValue(IValueFetcher fetcher)Evaluate the expression in the given state with respect to given parameters.inthashCode()Get the hash code for the node.static intorderFromString(java.lang.String order)Convert an ordering direction from a string representation.static java.lang.StringorderToString(int order)Convert an ordering direction to a string representation.voidprecompile()Precompile the node.voidsetOrder(java.lang.String order)Set the ordering direction.voidsetOrderBy(boolean orderby)Set the where order by flag.voidsetText(java.lang.String text)Set the token text.voidsetVariables(java.lang.String[] vars)Set the variable names.voidsetWhere(boolean where)Set the where clause flag.java.lang.StringtoPlainString()Create a string representation of this node and its subnodes.static java.lang.StringtoString(int mode)Convert a selection mode to a string representation.- 
Methods inherited from class jadex.javaparser.javaccimpl.ExpressionNodeappendText, getConstantValue, getExpressionText, getParameters, getStaticType, getText, isConstant, precompileTree, setConstant, setConstantValue, setExpressionText, setStaticType, subnodeToString, throwEvaluationException, throwParseException, toString, toString
 - 
Methods inherited from class jadex.javaparser.javaccimpl.SimpleNodedump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent
 
- 
 
- 
- 
- 
Field Detail- 
ALLpublic static final int ALL The selection mode for returning a set of elements (default).- See Also:
- Constant Field Values
 
 - 
ANYpublic static final int ANY The selection mode for returning the first matching element.- See Also:
- Constant Field Values
 
 - 
IOTApublic static final int IOTA The selection mode for returning a single matching element.- See Also:
- Constant Field Values
 
 - 
ASCpublic static final int ASC The ascending order direction.- See Also:
- Constant Field Values
 
 - 
DESCpublic static final int DESC The descending order direction.- See Also:
- Constant Field Values
 
 - 
modeprotected int mode The selection mode.
 - 
varsprotected java.lang.String[] vars The variable names.
 - 
whereprotected boolean where The flag indicating presence of a where clause.
 - 
orderbyprotected boolean orderby The flag indicating presence of an order by clause.
 - 
orderprotected int order The order direction.
 
- 
 - 
Method Detail- 
setTextpublic void setText(java.lang.String text) Set the token text.- Overrides:
- setTextin class- ExpressionNode
- Parameters:
- text- The token text.
 
 - 
setVariablespublic void setVariables(java.lang.String[] vars) Set the variable names.
 - 
setWherepublic void setWhere(boolean where) Set the where clause flag.
 - 
setOrderBypublic void setOrderBy(boolean orderby) Set the where order by flag.
 - 
setOrderpublic void setOrder(java.lang.String order) Set the ordering direction.
 - 
precompilepublic void precompile() Precompile the node.- Overrides:
- precompilein class- ExpressionNode
 
 - 
getValuepublic java.lang.Object getValue(IValueFetcher fetcher) Evaluate the expression in the given state with respect to given parameters.- Specified by:
- getValuein interface- IParsedExpression
- Specified by:
- getValuein class- ExpressionNode
- Parameters:
- params- The parameters (string, value pairs), if any.
- Returns:
- The value of the term.
 
 - 
toPlainStringpublic java.lang.String toPlainString() Create a string representation of this node and its subnodes.- Specified by:
- toPlainStringin interface- Node
- Overrides:
- toPlainStringin class- ExpressionNode
- Returns:
- A string representation of this node.
 
 - 
getUnboundParameterNodespublic ParameterNode[] getUnboundParameterNodes() Get unbound parameter nodes.- Overrides:
- getUnboundParameterNodesin class- ExpressionNode
- Returns:
- The unbound parameter nodes.
 
 - 
toStringpublic static java.lang.String toString(int mode) Convert a selection mode to a string representation.- Parameters:
- mode- The mode
- Returns:
- A string representation of the mode.
 
 - 
orderToStringpublic static java.lang.String orderToString(int order) Convert an ordering direction to a string representation.- Parameters:
- order- The ordering direction
- Returns:
- A string representation of the ordering direction.
 
 - 
fromStringpublic static int fromString(java.lang.String mode) Convert a selection mode from a string representation.- Parameters:
- mode- The mode as string.
- Returns:
- The int value of the mode.
 
 - 
orderFromStringpublic static int orderFromString(java.lang.String order) Convert an ordering direction from a string representation.- Parameters:
- order- The ordering direction as string.
- Returns:
- The int value of the ordering direction.
 
 - 
equalspublic boolean equals(java.lang.Object o) Test if two nodes are equal.- Overrides:
- equalsin class- ExpressionNode
 
 - 
hashCodepublic int hashCode() Get the hash code for the node.- Overrides:
- hashCodein class- ExpressionNode
 
 
- 
 
-