Class AggregateConditionExp
java.lang.Object
org.apache.cayenne.exp.Expression
org.apache.cayenne.exp.AggregateConditionExp
- All Implemented Interfaces:
XMLSerializable
public abstract sealed class AggregateConditionExp
extends Expression
permits AndExp, NotExp, OrExp, WhenExp
Superclass of aggregated conditional nodes such as NOT, AND, OR. Performs
extra checks on parent and child expressions to validate conditions that are
not addressed in the Cayenne expressions grammar.
- Since:
- 5.0
-
Field Summary
Fields inherited from class Expression
operands, PRUNED_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexists()Returns expression that will be dynamically resolved to proper subqueries based on a relationships used (if no relationships are present in the original expression no subqueries will be used).protected booleanisValidParent(Expression parent) Whether this node can be an operand of the given node.Returns expression that will be dynamically resolved to proper subqueries based on a relationships used (if no relationships are present in the original expression no subqueries will be used).protected booleanpruneNodeForPrunedChild(Object prunedChild) Returns true if this node should be pruned from expression tree in the event a child is removed.voidsetOperand(int index, Object value) Sets a value of operand atindex, growing the operands array if needed.protected ObjecttransformExpression(Function<Object, Object> transformer) A recursive method called from "transform" to do the actual transformation.Methods inherited from class Expression
andExp, andExp, appendAsString, appendOperandAsString, deepCopy, encodeAsXML, equals, evaluate, evaluateNode, evaluateOperand, expName, filter, filterObjects, first, flattenTree, getExpressionOperator, getOperand, getOperandCount, getPathAliases, hashCode, match, notExp, orExp, orExp, params, params, paramsArray, parenthesizeAsOperand, setOperands, shallowCopy, toString, transform, traverse, traverse
-
Constructor Details
-
AggregateConditionExp
-
-
Method Details
-
pruneNodeForPrunedChild
Description copied from class:ExpressionReturns true if this node should be pruned from expression tree in the event a child is removed.- Overrides:
pruneNodeForPrunedChildin classExpression
-
transformExpression
Description copied from class:ExpressionA recursive method called from "transform" to do the actual transformation.- Overrides:
transformExpressionin classExpression- Returns:
- null, Expression.PRUNED_NODE or transformed expression.
-
isValidParent
Description copied from class:ExpressionWhether this node can be an operand of the given node. Called by the parent when the operand is set, to check what the grammar can't: e.g. a condition can only be an operand of a condition aggregate. By default any parent is valid.- Overrides:
isValidParentin classExpression
-
setOperand
Description copied from class:ExpressionSets a value of operand atindex, growing the operands array if needed. Operand indexing starts at 0. APersistentis replaced with its ObjectId. A nested expression is asked first whether this node is a valid parent for it, seeExpression.isValidParent(Expression).- Overrides:
setOperandin classExpression
-
exists
Description copied from class:ExpressionReturns expression that will be dynamically resolved to proper subqueries based on a relationships used (if no relationships are present in the original expression no subqueries will be used).- Overrides:
existsin classExpression- Returns:
- exists expression
- See Also:
-
notExists
Description copied from class:ExpressionReturns expression that will be dynamically resolved to proper subqueries based on a relationships used (if no relationships are present in the original expression no subqueries will be used).- Overrides:
notExistsin classExpression- Returns:
- not exists expression
- See Also:
-