org.teiid.query.mapping.relational
Class QueryNode

java.lang.Object
  extended by org.teiid.query.mapping.relational.QueryNode

public class QueryNode
extends java.lang.Object

The QueryNode represents a virtual or temporary group in the modeler. QueryNodes may be nested to indicate data queries built from other virtual or temporary groups. The root node of a tree of QueryNode objects should be defining a virtual group. Leaves should be other physical or virtual groups. Internal nodes of the tree are temporary groups.

A QueryNode must have a group name and a query. It may have a command (just used for convenient storage during conversion - this is not persisted).


Constructor Summary
QueryNode(java.lang.String query)
          Construct a query node with the required parameters.
 
Method Summary
 void addBinding(java.lang.String binding)
          Add parameter binding to this node.
 java.util.List<java.lang.String> getBindings()
          Get list of bindings.
 Command getCommand()
          Get command corresponding to query, may be null
 java.lang.String getQuery()
          Get SQL query
 UpdateValidator.UpdateInfo getUpdateInfo()
           
 void setBindings(java.util.List<java.lang.String> bindings)
          Set all of the bindings (existing are dropped)
 void setCommand(Command command)
          Set command - this is provided as a convenient place to cache this command during conversion.
 void setQuery(java.lang.String query)
          Set the SQL query
 void setUpdateInfo(UpdateValidator.UpdateInfo updateInfo)
           
 java.lang.String toString()
          Print plantree structure starting at this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryNode

public QueryNode(java.lang.String query)
Construct a query node with the required parameters.

Parameters:
query - SQL query
Method Detail

getQuery

public java.lang.String getQuery()
Get SQL query

Returns:
SQL query

setQuery

public void setQuery(java.lang.String query)
Set the SQL query

Parameters:
String - query

addBinding

public void addBinding(java.lang.String binding)
Add parameter binding to this node. Bindings should be added in the order they appear in the query.

Parameters:
binding - Binding reference

getBindings

public java.util.List<java.lang.String> getBindings()
Get list of bindings.

Returns:
bindings

setBindings

public void setBindings(java.util.List<java.lang.String> bindings)
Set all of the bindings (existing are dropped)

Parameters:
bindings - New bindings

setCommand

public void setCommand(Command command)
Set command - this is provided as a convenient place to cache this command during conversion.

Parameters:
command - Command corresponding to query

getCommand

public Command getCommand()
Get command corresponding to query, may be null

Returns:
command Command corresponding to query

toString

public java.lang.String toString()
Print plantree structure starting at this node

Overrides:
toString in class java.lang.Object
Returns:
String representing this node and all children under this node

getUpdateInfo

public UpdateValidator.UpdateInfo getUpdateInfo()

setUpdateInfo

public void setUpdateInfo(UpdateValidator.UpdateInfo updateInfo)


Copyright © 2011. All Rights Reserved.