Class ScalarExp
java.lang.Object
org.apache.cayenne.exp.Expression
org.apache.cayenne.exp.ScalarExp
- All Implemented Interfaces:
XMLSerializable
A plain value in the place of an expression, e.g. a constant select column or a whole where clause. A value that is
an operand of another expression is not wrapped in a scalar node; it is stored as is.
- Since:
- 5.0
-
Field Summary
FieldsFields inherited from class Expression
operands, PRUNED_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendAsString(Appendable out) Appends own content as a String to the provided Appendable: the operands separated by the operator.booleanprotected ObjectEvaluates itself with object, pushing result on the stack.protected StringgetExpressionOperator(int index) Returns the operator printed between the operands, before the operand at the given index.getValue()Returns the value, resolving anEnumRefto its enum constant.inthashCode()protected booleanWhether this node is wrapped in parentheses when printed as an operand of another node.voidCreates a copy of this expression node, without copying children.Methods inherited from class Expression
andExp, andExp, appendOperandAsString, deepCopy, encodeAsXML, evaluate, evaluateOperand, exists, expName, filter, filterObjects, first, flattenTree, getOperand, getOperandCount, getPathAliases, isValidParent, match, notExists, notExp, orExp, orExp, params, params, paramsArray, pruneNodeForPrunedChild, setOperand, setOperands, toString, transform, transformExpression, traverse, traverse
-
Field Details
-
value
-
-
Constructor Details
-
ScalarExp
Creates a scalar with the value passed as the only argument, or a null-valued scalar without arguments.
-
-
Method Details
-
evaluateNode
Description copied from class:ExpressionEvaluates itself with object, pushing result on the stack.- Specified by:
evaluateNodein classExpression- Throws:
Exception
-
shallowCopy
Creates a copy of this expression node, without copying children.- Specified by:
shallowCopyin classExpression
-
appendAsString
Description copied from class:ExpressionAppends own content as a String to the provided Appendable: the operands separated by the operator.- Overrides:
appendAsStringin classExpression- Throws:
IOException
-
setValue
-
getValue
-
getExpressionOperator
Description copied from class:ExpressionReturns the operator printed between the operands, before the operand at the given index.- Specified by:
getExpressionOperatorin classExpression
-
equals
- Overrides:
equalsin classExpression
-
hashCode
public int hashCode()- Overrides:
hashCodein classExpression
-
parenthesizeAsOperand
protected boolean parenthesizeAsOperand()Description copied from class:ExpressionWhether this node is wrapped in parentheses when printed as an operand of another node. Compound nodes are, leaves and nodes with their own delimiters (function calls, lists) are not.- Overrides:
parenthesizeAsOperandin classExpression
-