wt.query
Class CompoundQuerySpec

java.lang.Object
  extended by wt.query.CompoundQuerySpec
All Implemented Interfaces:
Externalizable, Serializable, Cloneable, StatementSpec, wt.query.CloneableStatementSpec

public class CompoundQuerySpec
extends Object
implements wt.query.CloneableStatementSpec, Externalizable

This class provides the functionality to build a compound query statement.

Any number of components can be added to the Compound Query (Two are required for a valid compound SQL statement). A single Set Operator can be specified.

The SQL statement is built from left to right using the components with the lowest index to the highest index. If precedence is significant, the components with equal precedence should be added to a separate instance and nested within another CompoundQuerySpec instance.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface wt.pds.StatementSpec
ADVANCED_QUERY_ENABLED, USE_BIND
 
Method Summary
 void addComponent(StatementSpec a_statementSpec)
          This method adds a component statement.
 void appendOrderBy(OrderBy a_orderBy)
          Appends an Order By expression to the compund query.
 SetOperator getSetOperator()
          Gets the object for the association that plays role: setOperator.
 boolean isAdvancedQueryEnabled()
          Gets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled.
 boolean isIncludeNestedParantheses()
          Gets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements.
 boolean isUseBind()
          Gets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.
 void setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
          Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled.
 void setIncludeNestedParantheses(boolean a_IncludeNestedParantheses)
          Sets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements.
 void setLocale(Locale a_locale)
          Set the client locale.
 void setSetOperator(SetOperator a_SetOperator)
          Sets the object for the association that plays role: setOperator.
 void setUseBind(boolean a_UseBind)
          Sets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isAdvancedQueryEnabled

public boolean isAdvancedQueryEnabled()
Gets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. By design, this attribute is transient and its value is not passed between Java Virtual Machine (JVM) processes. The value should be set within the same JVM process that executes the statement.

Supported API: true

Specified by:
isAdvancedQueryEnabled in interface StatementSpec
Returns:
boolean

setAdvancedQueryEnabled

public void setAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled)
Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled. By design, this attribute is transient and its value is not passed between Java Virtual Machine (JVM) processes. The value should be set within the same JVM process that executes the statement.

Supported API: true

Specified by:
setAdvancedQueryEnabled in interface StatementSpec
Parameters:
a_AdvancedQueryEnabled -

getSetOperator

public SetOperator getSetOperator()
Gets the object for the association that plays role: setOperator.

Supported API: true

Returns:
SetOperator

setSetOperator

public void setSetOperator(SetOperator a_SetOperator)
                    throws WTPropertyVetoException
Sets the object for the association that plays role: setOperator.

Supported API: true

Parameters:
a_SetOperator -
Throws:
WTPropertyVetoException

addComponent

public void addComponent(StatementSpec a_statementSpec)
This method adds a component statement.

Supported API: true

Parameters:
a_statementSpec - Component statement to add

appendOrderBy

public void appendOrderBy(OrderBy a_orderBy)
                   throws QueryException
Appends an Order By expression to the compund query. The ColumnExpression contained in the OrderBy should have a column alias set.

Supported API: true

Parameters:
a_orderBy - OrderBy object to append
Throws:
QueryException

isUseBind

public boolean isUseBind()
Gets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.

Supported API: true

Specified by:
isUseBind in interface StatementSpec
Returns:
boolean

setUseBind

public void setUseBind(boolean a_UseBind)
                throws WTPropertyVetoException
Sets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.

Supported API: true

Specified by:
setUseBind in interface StatementSpec
Parameters:
a_UseBind -
Throws:
WTPropertyVetoException

setLocale

public void setLocale(Locale a_locale)
               throws WTException
Set the client locale.

Supported API: true

Specified by:
setLocale in interface StatementSpec
Parameters:
a_locale -
Throws:
WTException

isIncludeNestedParantheses

public boolean isIncludeNestedParantheses()
Gets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements. This should always be included, but an Oracle bug can occur for top level statements. This attribute can be used as a workaround.

Supported API: true

Returns:
boolean

setIncludeNestedParantheses

public void setIncludeNestedParantheses(boolean a_IncludeNestedParantheses)
Sets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements. This should always be included, but an Oracle bug can occur for top level statements. This attribute can be used as a workaround.

Supported API: true

Parameters:
a_IncludeNestedParantheses -