|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.BasicStatementBuilder
wt.pds.SelectStatementBuilder
This class builds a select statements for the given classes.
Supported API: false
Extendable: false
Field Summary | |
protected int |
chunkCount
|
private static String |
CLASSNAME
|
static boolean |
DEBUG
|
private Integer |
depthThreshold
|
static long |
EXTERNALIZATION_VERSION_UID
|
protected static String |
LARGE_IN_LIST_WARNING
|
private static DebugWriter |
LOG
|
protected static long |
OLD_FORMAT_VERSION_UID
|
protected static long |
OLD_SERIAL_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private int |
totalCount
|
private boolean |
unionStatement
|
Fields inherited from class wt.pds.BasicStatementBuilder |
DMLGENERATOR |
Fields inherited from interface wt.pds.StatementBuilder |
CHUNKING_ENABLED, FETCH_SIZE, SQL_STATEMENTS, STATEMENT_COUNT |
Constructor Summary | |
SelectStatementBuilder()
|
Method Summary | |
abstract String |
buildEmptyAggregateSQL()
Supported API: false |
String[] |
buildSQL(ResultBuilder a_resultBuilder,
WTConnection a_connection,
boolean a_isComponent,
boolean a_isComponentChunkSupported)
Returns an array of JDBC statements to execute. |
abstract String |
buildSQLStatement(Vector a_tables,
Vector a_aliases,
ResultBuilder a_resultBuilder,
boolean a_distinct,
WhereClause a_whereClause,
String a_orderByClause,
GroupByClause a_groupByClause,
ConditionsClause a_havingClause,
int a_sqlIndex,
boolean a_forUpdate)
This method builds a SQL statement. |
protected void |
clone(SelectStatementBuilder clone)
This method is a clone "helper". |
protected abstract List |
getArrayChunkProcessors(int a_arraySizeThreshold)
This method returns a List of ArrayChunkProcessor instances for this query. |
protected int |
getChunkProcessorCount()
|
protected int |
getChunkProcessorCount(int chunkProcessorLimit)
|
Integer |
getDepthThreshold()
Gets the value of the attribute: depthThreshold; Threshold value for the number of subclass combinations. |
abstract FromClause |
getFromClause()
Gets the object for the association that plays role: fromClause. |
abstract GroupByClause |
getGroupByClause()
Gets the value of the attribute: groupByClause. |
abstract ConditionsClause |
getHavingClause()
Gets the value of the attribute: havingClause. |
abstract OrderByClause |
getOrderByClause()
Gets the value of the attribute: orderByClause. |
abstract StatementFilter |
getStatementFilter(Vector[] a_fromArray)
StatementBuilder used to generate SQL for the depth threshold query. |
abstract Vector[] |
getTables()
This method returns an array of Vectors. |
protected int |
getTotalCount()
Gets the value of the attribute: totalCount; Total number of SQL statements. |
abstract WhereClause |
getWhereClause()
Gets the value of the attribute: whereClause. |
abstract boolean |
isAggregateSelect()
Supported API: false |
abstract boolean |
isDistinct()
Gets the value of the attribute: distinct. |
boolean |
isForUpdateSet()
Gets the value of the attribute: forUpdateSet. |
protected boolean |
isQueryChunkingRequired()
|
protected boolean |
isQueryChunkingRequired(int chunkProcessorLimit)
|
protected boolean |
isQueryChunkingSupported()
|
abstract boolean |
isQuerySpecSetLock()
Supported API: false |
protected boolean |
isUnionStatement()
Gets the value of the attribute: unionStatement; Indicates if a union statement is used. |
abstract boolean |
isUseBind()
Gets the value of the attribute: useBind. |
abstract List |
preBuildSQL()
This method is used to process join search conditions, construct bind parameters for the Where, and set class view attributes. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(SelectStatementBuilder thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
protected abstract void |
resetBindParameterVectors()
|
void |
setDepthThreshold(Integer a_DepthThreshold)
Sets the value of the attribute: depthThreshold; Threshold value for the number of subclass combinations. |
void |
setForUpdateSet(boolean a_ForUpdateSet)
Sets the value of the attribute: forUpdateSet. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class wt.pds.BasicStatementBuilder |
appendBindParameter, buildSQL, clone, getFetchSize, getSqlStatements, getStatement, getStatementBindParameters, getStatementCount, insertBindParameterAt, isChunkingEnabled, readVersion, setChunkingEnabled, setFetchSize, setSqlStatements |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Integer depthThreshold
private transient int totalCount
private transient boolean unionStatement
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
protected static final long OLD_SERIAL_VERSION_UID
public static final boolean DEBUG
private static final DebugWriter LOG
protected transient int chunkCount
protected static final String LARGE_IN_LIST_WARNING
Constructor Detail |
public SelectStatementBuilder()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BasicStatementBuilder
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BasicStatementBuilder
input
-
IOException
ClassNotFoundException
protected boolean readVersion(SelectStatementBuilder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public abstract boolean isDistinct()
public abstract WhereClause getWhereClause()
public abstract OrderByClause getOrderByClause() throws WTException
WTException
public Integer getDepthThreshold()
public void setDepthThreshold(Integer a_DepthThreshold) throws WTPropertyVetoException
a_DepthThreshold
-
WTPropertyVetoException
public abstract GroupByClause getGroupByClause() throws WTException
WTException
protected int getTotalCount()
protected boolean isUnionStatement()
public abstract boolean isUseBind()
public abstract ConditionsClause getHavingClause() throws WTException
WTException
public boolean isForUpdateSet()
public void setForUpdateSet(boolean a_ForUpdateSet) throws WTPropertyVetoException
a_ForUpdateSet
-
WTPropertyVetoException
public abstract FromClause getFromClause()
public String[] buildSQL(ResultBuilder a_resultBuilder, WTConnection a_connection, boolean a_isComponent, boolean a_isComponentChunkSupported) throws PersistenceException
buildSQL
in interface StatementBuilder
a_resultBuilder
- a_connection
- a_isComponent
- Indicates that these SQL statements will be used as nested components of another SQL statement.a_isComponentChunkSupported
- Indicates that these SQL statements will support chunk or not, and the value will be false when a_isComponent is false, and can be true or false when a_isComponents is true.
PersistenceException
public abstract Vector[] getTables() throws PersistenceException
PersistenceException
public abstract String buildSQLStatement(Vector a_tables, Vector a_aliases, ResultBuilder a_resultBuilder, boolean a_distinct, WhereClause a_whereClause, String a_orderByClause, GroupByClause a_groupByClause, ConditionsClause a_havingClause, int a_sqlIndex, boolean a_forUpdate) throws PersistenceException
a_tables
- The TableExpressions for this statement.a_aliases
- The aliases corresponding to the TableExpressions for this statement.a_resultBuilder
- Result builder instance to use for constructing the statement.a_distinct
- a_whereClause
- a_orderByClause
- a_groupByClause
- a_havingClause
- a_sqlIndex
- SQL index of this statement.a_forUpdate
-
PersistenceException
public abstract StatementFilter getStatementFilter(Vector[] a_fromArray) throws PersistenceException
a_fromArray
- Array of Vectors containing FromExpression instances
PersistenceException
public abstract String buildEmptyAggregateSQL() throws PersistenceException
PersistenceException
public abstract boolean isAggregateSelect()
public abstract boolean isQuerySpecSetLock()
public abstract List preBuildSQL() throws PersistenceException
PersistenceException
protected abstract List getArrayChunkProcessors(int a_arraySizeThreshold) throws WTException
WTException
protected void clone(SelectStatementBuilder clone)
clone
- pre-allocated object to cloneprotected boolean isQueryChunkingSupported() throws WTException
WTException
protected int getChunkProcessorCount() throws WTException
WTException
protected boolean isQueryChunkingRequired() throws WTException
WTException
protected int getChunkProcessorCount(int chunkProcessorLimit) throws WTException
WTException
protected boolean isQueryChunkingRequired(int chunkProcessorLimit) throws WTException
WTException
protected abstract void resetBindParameterVectors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |