# Class ExpressionNode

java.lang.Object
org.apache.cayenne.access.sqlbuilder.sqltree.Node
org.apache.cayenne.access.sqlbuilder.sqltree.ExpressionNode

Direct Known Subclasses:
  `BetweenNode, BitwiseNotNode, EqualNode, LikeNode, NotEqualNode, OpExpressionNode`

public class ExpressionNode extends Node

Since:
  4.2

- ## Field Summary

  ### Fields inherited from class Node

  `children, childrenCount, parent, type`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExpressionNode()`
  `ExpressionNode(NodeType nodeType)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SQLAppendable`
  `append(SQLAppendable buffer, SQLGenerationContext context)`
  `void`
  `appendChildrenEnd(SQLAppendable buffer)`
  `void`
  `appendChildrenStart(SQLAppendable buffer)`
  `Node`
  `copy()`
  `protected boolean`
  `isComparison()`
  `protected String`
  `logicalOperator()`
  `protected boolean`
  `needsParentheses()`
  `String`
  `toString()`

  ### Methods inherited from class Node

  `addChild, addChild, appendChildrenSeparator, deepCopy, deepEquals, equals, getChild, getChildrenCount, getParent, getType, hashCode, replaceChild, setParent, visit`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ExpressionNode

    public ExpressionNode()

  - ### ExpressionNode

    public ExpressionNode(NodeType nodeType)

- ## Method Details

  - ### append

    public SQLAppendable append(SQLAppendable buffer, SQLGenerationContext context)
    Specified by:
      `append` in class `Node`

  - ### appendChildrenStart

    public void appendChildrenStart(SQLAppendable buffer)
    Overrides:
      `appendChildrenStart` in class `Node`

  - ### appendChildrenEnd

    public void appendChildrenEnd(SQLAppendable buffer)
    Overrides:
      `appendChildrenEnd` in class `Node`

  - ### needsParentheses

    protected boolean needsParentheses()

  - ### logicalOperator

    protected String logicalOperator()
    Returns:
      `"AND"` or `"OR"` if this node is a logical connective, otherwise `null`.

  - ### isComparison

    protected boolean isComparison()
    Returns:
      true for comparison operators that bind tighter than `AND`/`OR` and therefore don't need parentheses when nested directly under them.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Node`

  - ### copy

    public Node copy()
    Specified by:
      `copy` in class `Node`