Class AggregateConditionExp

java.lang.Object
org.apache.cayenne.exp.Expression
org.apache.cayenne.exp.AggregateConditionExp
All Implemented Interfaces:
XMLSerializable
Direct Known Subclasses:
AndExp, NotExp, OrExp, WhenExp

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
  • Constructor Details

    • AggregateConditionExp

      protected AggregateConditionExp(Object... operands)
  • Method Details

    • pruneNodeForPrunedChild

      protected boolean pruneNodeForPrunedChild(Object prunedChild)
      Description copied from class: Expression
      Returns true if this node should be pruned from expression tree in the event a child is removed.
      Overrides:
      pruneNodeForPrunedChild in class Expression
    • transformExpression

      protected Object transformExpression(Function<Object,Object> transformer)
      Description copied from class: Expression
      A recursive method called from "transform" to do the actual transformation.
      Overrides:
      transformExpression in class Expression
      Returns:
      null, Expression.PRUNED_NODE or transformed expression.
    • isValidParent

      protected boolean isValidParent(Expression parent)
      Description copied from class: Expression
      Whether 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:
      isValidParent in class Expression
    • setOperand

      public void setOperand(int index, Object value)
      Description copied from class: Expression
      Sets a value of operand at index, growing the operands array if needed. Operand indexing starts at 0. A Persistent is replaced with its ObjectId. A nested expression is asked first whether this node is a valid parent for it, see Expression.isValidParent(Expression).
      Overrides:
      setOperand in class Expression
    • exists

      public Expression exists()
      Description copied from class: Expression
      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).
      Overrides:
      exists in class Expression
      Returns:
      exists expression
      See Also:
    • notExists

      public Expression notExists()
      Description copied from class: Expression
      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).
      Overrides:
      notExists in class Expression
      Returns:
      not exists expression
      See Also: