org.apache.cayenne.access.sqlbuilder.sqltree

## Class Node

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

- Direct Known Subclasses:
    AliasedNode, ColumnNode, ConvertNode, DeleteNode, DistinctNode, EmptyNode, ExistsNode, ExpressionNode, FirebirdLimitNode, FromNode, FunctionNode, GroupByNode, HavingNode, InNode, InsertColumnsNode, InsertNode, InsertValuesNode, JoinNode, LimitOffsetNode, NotNode, OffsetNode, OrderByNode, PostgresExtractFunctionNode, SelectNode, SelectResultNode, SubqueryNode, TableNode, TextNode, TopNode, TrimmingColumnNode, UpdateNode, UpdateSetNode, ValueNode, WhereNode

      public abstract class Node
      extends Object

  Since:
    4.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Node[]` | `children`
    `protected int` | `childrenCount`
    `protected Node` | `parent`
    `protected NodeType` | `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Node()`
    `Node(NodeType type)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Node` | `addChild(int index, Node node)`
    `Node` | `addChild(Node node)`
    `abstract QuotingAppendable` | `append(QuotingAppendable buffer)`
    `void` | `appendChildrenEnd(QuotingAppendable buffer)`
    `void` | `appendChildrenSeparator(QuotingAppendable buffer, int childInd)`
    `void` | `appendChildrenStart(QuotingAppendable buffer)`
    `abstract Node` | `copy()`
    `<T extends Node> T` | `deepCopy()`
    `Node` | `getChild(int idx)`
    `int` | `getChildrenCount()`
    `Node` | `getParent()`
    `NodeType` | `getType()`
    `void` | `replaceChild(int idx, Node node)`
    `void` | `setParent(Node parent)`
    `String` | `toString()`
    `void` | `visit(NodeTreeVisitor visitor)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### parent

          protected Node parent

    - #### children

          protected Node[] children

    - #### childrenCount

          protected int childrenCount

    - #### type

          protected final NodeType type

  - ### Constructor Detail

    - #### Node

          public Node(NodeType type)

    - #### Node

          public Node()

  - ### Method Detail

    - #### addChild

          public Node addChild(int index,
                               Node node)

    - #### addChild

          public Node addChild(Node node)

    - #### getChild

          public Node getChild(int idx)

    - #### getChildrenCount

          public int getChildrenCount()

    - #### replaceChild

          public void replaceChild(int idx,
                                   Node node)

    - #### getParent

          public Node getParent()

    - #### setParent

          public void setParent(Node parent)

    - #### visit

          public void visit(NodeTreeVisitor visitor)

    - #### deepCopy

          public <T extends Node> T deepCopy()

      Returns:
        deep copy(i.e. with copies of all children) of this node

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getType

          public NodeType getType()

    - #### copy

          public abstract Node copy()

    - #### append

          public abstract QuotingAppendable append(QuotingAppendable buffer)

    - #### appendChildrenSeparator

          public void appendChildrenSeparator(QuotingAppendable buffer,
                                              int childInd)

    - #### appendChildrenStart

          public void appendChildrenStart(QuotingAppendable buffer)

    - #### appendChildrenEnd

          public void appendChildrenEnd(QuotingAppendable buffer)

Copyright © 2001–2021 Apache Cayenne. All rights reserved.