public class SelectNode extends ExpressionNode
Modifier and Type | Field and Description |
---|---|
static int |
ALL
The selection mode for returning a set of elements (default).
|
static int |
ANY
The selection mode for returning the first matching element.
|
static int |
ASC
The ascending order direction.
|
static int |
DESC
The descending order direction.
|
static int |
IOTA
The selection mode for returning a single matching element.
|
protected int |
mode
The selection mode.
|
protected int |
order
The order direction.
|
protected boolean |
orderby
The flag indicating presence of an order by clause.
|
protected java.lang.String[] |
vars
The variable names.
|
protected boolean |
where
The flag indicating presence of a where clause.
|
constant, constant_value, expressiontext, imports, static_type, text
children, id, parent
Constructor and Description |
---|
SelectNode(ParserImpl p,
int id)
Create a node.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Test if two nodes are equal.
|
static int |
fromString(java.lang.String mode)
Convert a selection mode from a string representation.
|
ParameterNode[] |
getUnboundParameterNodes()
Get unbound parameter nodes.
|
java.lang.Object |
getValue(IValueFetcher fetcher)
Evaluate the expression in the given state
with respect to given parameters.
|
int |
hashCode()
Get the hash code for the node.
|
static int |
orderFromString(java.lang.String order)
Convert an ordering direction from a string representation.
|
static java.lang.String |
orderToString(int order)
Convert an ordering direction to a string representation.
|
void |
precompile()
Precompile the node.
|
void |
setOrder(java.lang.String order)
Set the ordering direction.
|
void |
setOrderBy(boolean orderby)
Set the where order by flag.
|
void |
setText(java.lang.String text)
Set the token text.
|
void |
setVariables(java.lang.String[] vars)
Set the variable names.
|
void |
setWhere(boolean where)
Set the where clause flag.
|
java.lang.String |
toPlainString()
Create a string representation of this node and its subnodes.
|
static java.lang.String |
toString(int mode)
Convert a selection mode to a string representation.
|
appendText, getConstantValue, getExpressionText, getParameters, getStaticType, getText, isConstant, precompileTree, setConstant, setConstantValue, setExpressionText, setStaticType, subnodeToString, throwEvaluationException, throwParseException, toString, toString
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent
public static final int ALL
public static final int ANY
public static final int IOTA
public static final int ASC
public static final int DESC
protected int mode
protected java.lang.String[] vars
protected boolean where
protected boolean orderby
protected int order
public SelectNode(ParserImpl p, int id)
p
- The parser.id
- The id.public void setText(java.lang.String text)
setText
in class ExpressionNode
text
- The token text.public void setVariables(java.lang.String[] vars)
public void setWhere(boolean where)
public void setOrderBy(boolean orderby)
public void setOrder(java.lang.String order)
public void precompile()
precompile
in class ExpressionNode
public java.lang.Object getValue(IValueFetcher fetcher)
getValue
in interface IParsedExpression
getValue
in class ExpressionNode
params
- The parameters (string, value pairs), if any.public java.lang.String toPlainString()
toPlainString
in interface Node
toPlainString
in class ExpressionNode
public ParameterNode[] getUnboundParameterNodes()
getUnboundParameterNodes
in class ExpressionNode
public static java.lang.String toString(int mode)
mode
- The modepublic static java.lang.String orderToString(int order)
order
- The ordering directionpublic static int fromString(java.lang.String mode)
mode
- The mode as string.public static int orderFromString(java.lang.String order)
order
- The ordering direction as string.public boolean equals(java.lang.Object o)
equals
in class ExpressionNode
public int hashCode()
hashCode
in class ExpressionNode