wt.pds
Class BasicStatementBuilder

java.lang.Object
  extended bywt.pds.BasicStatementBuilder
All Implemented Interfaces:
Externalizable, Serializable, StatementBuilder
Direct Known Subclasses:
BasicCompoundStatementBuilder, CompositeStatementBuilder, DepthThresholdStatementBuilder, DistinctNavigateThresholdStatementBuilder, ObjectReferenceStatementBuilder, SelectStatementBuilder

public abstract class BasicStatementBuilder
extends Object
implements StatementBuilder, Externalizable

This class implements common methods.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private  boolean chunkingEnabled
           
private static String CLASSNAME
           
protected static DMLGenerator DMLGENERATOR
           
static long EXTERNALIZATION_VERSION_UID
           
private  int fetchSize
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String[] sqlStatements
           
 
Fields inherited from interface wt.pds.StatementBuilder
CHUNKING_ENABLED, FETCH_SIZE, SQL_STATEMENTS, STATEMENT_COUNT
 
Constructor Summary
BasicStatementBuilder()
           
 
Method Summary
static void appendBindParameter(Object a_parameter, Vector a_parameterList)
          Deprecated. as of R8.0, use wt.pds.BindParameterUtil.appendBindParameter(Object, List)
 String[] buildSQL(ResultBuilder a_resultBuilder, WTConnection a_connection, boolean a_isComponent)
          Returns an array of SQL statements to execute.
protected  void clone(BasicStatementBuilder clone)
           
 int getFetchSize()
          Gets the value of the attribute: fetchSize.
 String[] getSqlStatements()
          Gets the value of the attribute: sqlStatements; Array of SQL statements.
 PreparedStatement getStatement(WTConnection a_connection, int a_sqlIndex)
          Returns an array of JDBC statements to execute.
abstract  Vector getStatementBindParameters(int a_sqlIndex)
          Returns a Vector of bind parameters for the specified statement.
 int getStatementCount()
          Gets the value of the attribute: statementCount; Number of SQL statements.
static int insertBindParameterAt(Object a_parameter, int a_index, Vector a_parameterList)
          Inserts a bind parameter to the internal list of bind parameters for all statements.
 boolean isChunkingEnabled()
          Gets the value of the attribute: chunkingEnabled; Indicates if chunking is enabled.
 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(BasicStatementBuilder thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setChunkingEnabled(boolean a_ChunkingEnabled)
          Sets the value of the attribute: chunkingEnabled; Indicates if chunking is enabled.
 void setFetchSize(int a_FetchSize)
          Sets the value of the attribute: fetchSize.
protected  void setSqlStatements(String[] a_SqlStatements)
          Sets the value of the attribute: sqlStatements; Array of SQL statements.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.pds.StatementBuilder
buildSQL
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

sqlStatements

private String[] sqlStatements

fetchSize

private int fetchSize

chunkingEnabled

private boolean chunkingEnabled

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

DMLGENERATOR

protected static final DMLGenerator DMLGENERATOR
Constructor Detail

BasicStatementBuilder

public BasicStatementBuilder()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(BasicStatementBuilder thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getStatement

public PreparedStatement getStatement(WTConnection a_connection,
                                      int a_sqlIndex)
                               throws PersistenceException
Returns an array of JDBC statements to execute.

Supported API: false

Specified by:
getStatement in interface StatementBuilder
Parameters:
a_connection -
a_sqlIndex -
Returns:
PreparedStatement
Throws:
PersistenceException

appendBindParameter

public static void appendBindParameter(Object a_parameter,
                                       Vector a_parameterList)
Deprecated. as of R8.0, use wt.pds.BindParameterUtil.appendBindParameter(Object, List)

Appends a bind parameter to the internal list of bind parameters for all statements. A bind parameter that is a Vector is handled recursively appending all elements.

Supported API: false

Parameters:
a_parameter - Bind parameter to append.
a_parameterList - Bind parameter list to append to.

insertBindParameterAt

public static int insertBindParameterAt(Object a_parameter,
                                        int a_index,
                                        Vector a_parameterList)
Inserts a bind parameter to the internal list of bind parameters for all statements. A bind parameter that is a Vector is handled recursively inserting all elements. Returns the number of bind parameters inserted.

Supported API: false

Parameters:
a_parameter - Bind paremeter to insert.
a_index - Index to insert at.
a_parameterList - Bind parameter list to insert to.
Returns:
int

getStatementBindParameters

public abstract Vector getStatementBindParameters(int a_sqlIndex)
                                           throws PersistenceException
Returns a Vector of bind parameters for the specified statement.

Supported API: false

Specified by:
getStatementBindParameters in interface StatementBuilder
Parameters:
a_sqlIndex -
Returns:
Vector
Throws:
PersistenceException

buildSQL

public String[] buildSQL(ResultBuilder a_resultBuilder,
                         WTConnection a_connection,
                         boolean a_isComponent)
                  throws PersistenceException
Returns an array of SQL statements to execute.

Supported API: false

Specified by:
buildSQL in interface StatementBuilder
Parameters:
a_resultBuilder -
a_connection -
a_isComponent - Indicates that these SQL statements will be used as nested components of another SQL statement.
Returns:
String[]
Throws:
PersistenceException

getSqlStatements

public String[] getSqlStatements()
Gets the value of the attribute: sqlStatements; Array of SQL statements. Valid only after a call to buildSQL().

Supported API: false

Specified by:
getSqlStatements in interface StatementBuilder
Returns:
String[]

setSqlStatements

protected void setSqlStatements(String[] a_SqlStatements)
                         throws WTPropertyVetoException
Sets the value of the attribute: sqlStatements; Array of SQL statements. Valid only after a call to buildSQL().

Supported API: false

Parameters:
a_SqlStatements -
Throws:
WTPropertyVetoException

getStatementCount

public int getStatementCount()
Gets the value of the attribute: statementCount; Number of SQL statements. Valid only after a call to buildSQL().

Supported API: false

Specified by:
getStatementCount in interface StatementBuilder
Returns:
int

getFetchSize

public int getFetchSize()
Gets the value of the attribute: fetchSize.

Supported API: false

Specified by:
getFetchSize in interface StatementBuilder
Returns:
int

setFetchSize

public void setFetchSize(int a_FetchSize)
Sets the value of the attribute: fetchSize.

Supported API: false

Specified by:
setFetchSize in interface StatementBuilder
Parameters:
a_FetchSize -

isChunkingEnabled

public boolean isChunkingEnabled()
Gets the value of the attribute: chunkingEnabled; Indicates if chunking is enabled.

Supported API: false

Specified by:
isChunkingEnabled in interface StatementBuilder
Returns:
boolean

setChunkingEnabled

public void setChunkingEnabled(boolean a_ChunkingEnabled)
                        throws WTPropertyVetoException
Sets the value of the attribute: chunkingEnabled; Indicates if chunking is enabled.

Supported API: false

Specified by:
setChunkingEnabled in interface StatementBuilder
Parameters:
a_ChunkingEnabled -
Throws:
WTPropertyVetoException

clone

protected void clone(BasicStatementBuilder clone)