Package wt.query
Class CompoundQuerySpec
java.lang.Object
wt.query.CompoundQuerySpec
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,StatementSpec,wt.query.CloneableStatementSpec,wt.query.CompoundComponentStatementSpec
public class CompoundQuerySpec
extends Object
implements wt.query.CloneableStatementSpec, wt.query.CompoundComponentStatementSpec, 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:
-
Field Summary
Fields inherited from interface wt.pds.StatementSpec
ADVANCED_QUERY_ENABLED, USE_BIND -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(StatementSpec a_statementSpec) This method adds a component statement.voidappendOrderBy(OrderBy a_orderBy) Appends an Order By expression to the compund query.Gets the object for the association that plays role: setOperator.booleanGets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled.booleanGets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements.booleanGets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.voidsetAdvancedQueryEnabled(boolean a_AdvancedQueryEnabled) Sets the value of the attribute: advancedQueryEnabled; Indicates if advanced query capabilities are enabled.voidsetIncludeNestedParantheses(boolean a_IncludeNestedParantheses) Sets the value of the attribute: includeNestedParantheses; Indicates if parantheses should be included for nested statements.voidsetSetOperator(SetOperator a_SetOperator) Sets the object for the association that plays role: setOperator.voidsetUseBind(boolean a_UseBind) Sets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.
-
Method Details
-
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:
isAdvancedQueryEnabledin interfaceStatementSpec- 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:
setAdvancedQueryEnabledin interfaceStatementSpec- Parameters:
a_AdvancedQueryEnabled-
-
getSetOperator
Gets the object for the association that plays role: setOperator.
Supported API: true- Returns:
- SetOperator
-
setSetOperator
Sets the object for the association that plays role: setOperator.
Supported API: true- Parameters:
a_SetOperator-- Throws:
WTPropertyVetoException
-
addComponent
This method adds a component statement.
Supported API: true- Parameters:
a_statementSpec- Component statement to add
-
appendOrderBy
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:
isUseBindin interfaceStatementSpec- Returns:
- boolean
-
setUseBind
Sets the value of the attribute: useBind; Indicates if bind parameters should be used for this statement.
Supported API: true- Specified by:
setUseBindin interfaceStatementSpec- Parameters:
a_UseBind-- Throws:
WTPropertyVetoException
-
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-
-