wt.pds
Interface DMLGenerator

All Known Implementing Classes:
StandardDMLGenerator

public interface DMLGenerator

This interface provides the abstraction for generating datastore specific Data Manipulation Language (DML) statements.

Supported API: false

Extendable: false


Field Summary
static String AND
           
static String AUTO_NAVI_ALIAS
           
static String BIND_PLACEHOLDER
           
static char CLOSE_PAREN
           
static String COLUMNALIAS_SUFFIX
           
static char COMMA
           
static char DB_DELIMITER
           
static String DELETE
           
static String DELETE_FROM
           
static String DISTINCT
           
static String DUMMY_BINDPARAMETER
           
static String DUMMY_TABLE
           
static String EQUAL
           
static String EQUAL_PLACEHOLDER
           
static String ESCAPE
           
static char ESCAPE_CHAR
           
static String EXISTS
           
static String FALSE_CONDITION
           
static String FROM
           
static String GREATER_THAN
           
static String GROUP_BY
           
static String HAVING
           
static String INNER_JOIN
           
static String INSERT_INTO
           
static String INTERSECT
           
static String LEFT_OUTER_JOIN
           
static String MINUS
           
static String NOT
           
static String NULL
           
static String NULL_DATE
           
static String NULL_NUMBER
           
static String ON
           
static char OPEN_PAREN
           
static String OR
           
static String ORDER_BY
           
static String OUTER_JOIN
           
static char PLACEHOLDER
           
static String RIGHT_OUTER_JOIN
           
static String SELECT
           
static String SET
           
static String SET_EQUAL
           
static char SINGLE_QUOTE
           
static char SPACE
           
static int STRING_BUFFER_INITIAL_LENGTH
           
static String TIMESTAMP_FORMAT
           
static String TRUE_CONDITION
           
static String UNION
           
static String UNION_ALL
           
static String UPDATE
           
static String VIEW_PREFIX
           
static String WHERE
           
static String ZERO
           
 
Method Summary
 void appendQuote(Object a_value, StringBuffer a_buffer)
          

Supported API: false
 ArrayTableExpression[] buildArrayTableExpression(String[] selectListArray, List a_oidList, int offset, int count, int oidCount, int a_groupFromIndex, boolean useExtend, boolean useRowExtension, int rowExtensionNum, long a_sessionId)
          

Supported API: false
 String buildArrayTableExpression(String a_alias, String a_type, String a_selectList, Object a_values)
          This method is used to build the SQL string for ArrayTableExpression.
 String[] buildArrayTableSelectList(int oidCount, int a_groupFromIndex, boolean useExtend, boolean useRowExtension, int rowExtensionNum)
          

Supported API: false
 String buildAttributeUpdateStatement(Persistable object, String[] attribute_names)
          

Supported API: false
 Object buildBindParameters(StatementSpec a_statementSpec)
          

Supported API: false
 String buildCall(String a_procedureName, int a_parameterCount, boolean a_isFunction)
          

Supported API: false
 String buildCompoundStatement(String[] a_sqlStatements, String a_setOperator, String a_orderByClause)
          

Supported API: false
 void buildDeleteStatement(ClassInfo a_classInfo, WhereExpression a_where, boolean a_useBind, StringBuffer a_delete)
          This method builds a DELETE-WHERE SQL statement.
 String buildDummySubSelectStatement(StatementSpec a_statementSpec, String a_alias)
          

Supported API: false
 String buildEmptyDummySubSelectStatement()
          

Supported API: false
 String buildInsertStatement(ClassInfo a_classInfo, ColumnDescriptor[] a_insertColumns)
          

Supported API: false
 String buildInsertStatement(StatementSpec a_statementSpec, String tableName, WTConnection a_connection)
          

Supported API: false
 String buildInsertStatement(String a_tableName, ColumnDescriptor[] a_insertColumns, Object[] a_values)
          This method builds an INSERT statement.
 String buildLockStatement(ClassInfo a_classInfo)
          

Supported API: false
 String buildSelectStatement(Vector a_tables, Vector a_aliases, ResultBuilder a_resultBuilder, boolean a_isDistinct, String a_select, String a_whereClause, String a_groupByClause, String a_havingClause, String a_orderByClause, boolean a_forUpdate, int[] a_joinOrder, Vector a_hintsVector, boolean[] a_fullPersistableTableIndicies, JoinClause a_joinClause, boolean a_useBind)
          

Supported API: false
 String[] buildStatements(StatementSpec a_statementSpec, WTConnection a_connection)
          

Supported API: false
 String buildSubSelectStatement(StatementSpec a_statementSpec, WTConnection a_connection)
          

Supported API: false
 String buildTableLockStatement(ClassInfo a_classInfo)
          

Supported API: false
 String buildUpdateStatement(ClassInfo a_classInfo, ColumnDescriptor[] a_columns)
          

Supported API: false
 boolean buildUpdateStatement(ClassInfo a_classInfo, WhereExpression a_where, boolean a_useBind, UpdateColumnExpression[] a_updateColumns, StringBuffer a_buffer)
          This method builds the specified UPDATE statement.
 String getComputedColumnName(String funcName, Vector args, Vector a_tableInfos, Vector a_aliases)
          This method returns the computed column name for the function, if it exists.
 String getFunctionExpression(String funcName, Vector args, boolean a_useBind, Vector a_tableInfos, Vector a_aliases, boolean a_outerJoin)
          This method returns the DML string representation of the function.
 StringBuffer quote(Object a_value, StringBuffer a_buffer)
          

Supported API: false
 

Field Detail

TIMESTAMP_FORMAT

public static final String TIMESTAMP_FORMAT
See Also:
Constant Field Values

COMMA

public static final char COMMA
See Also:
Constant Field Values

SPACE

public static final char SPACE
See Also:
Constant Field Values

DB_DELIMITER

public static final char DB_DELIMITER
See Also:
Constant Field Values

OPEN_PAREN

public static final char OPEN_PAREN
See Also:
Constant Field Values

CLOSE_PAREN

public static final char CLOSE_PAREN
See Also:
Constant Field Values

SINGLE_QUOTE

public static final char SINGLE_QUOTE
See Also:
Constant Field Values

PLACEHOLDER

public static final char PLACEHOLDER
See Also:
Constant Field Values

OUTER_JOIN

public static final String OUTER_JOIN
See Also:
Constant Field Values

INNER_JOIN

public static final String INNER_JOIN
See Also:
Constant Field Values

LEFT_OUTER_JOIN

public static final String LEFT_OUTER_JOIN
See Also:
Constant Field Values

RIGHT_OUTER_JOIN

public static final String RIGHT_OUTER_JOIN
See Also:
Constant Field Values

ON

public static final String ON
See Also:
Constant Field Values

SELECT

public static final String SELECT
See Also:
Constant Field Values

DISTINCT

public static final String DISTINCT
See Also:
Constant Field Values

FROM

public static final String FROM
See Also:
Constant Field Values

WHERE

public static final String WHERE
See Also:
Constant Field Values

ORDER_BY

public static final String ORDER_BY
See Also:
Constant Field Values

GROUP_BY

public static final String GROUP_BY
See Also:
Constant Field Values

HAVING

public static final String HAVING
See Also:
Constant Field Values

UNION

public static final String UNION
See Also:
Constant Field Values

UNION_ALL

public static final String UNION_ALL
See Also:
Constant Field Values

INTERSECT

public static final String INTERSECT
See Also:
Constant Field Values

MINUS

public static final String MINUS
See Also:
Constant Field Values

EXISTS

public static final String EXISTS
See Also:
Constant Field Values

NOT

public static final String NOT
See Also:
Constant Field Values

UPDATE

public static final String UPDATE
See Also:
Constant Field Values

SET

public static final String SET
See Also:
Constant Field Values

DELETE

public static final String DELETE
See Also:
Constant Field Values

INSERT_INTO

public static final String INSERT_INTO
See Also:
Constant Field Values

DELETE_FROM

public static final String DELETE_FROM
See Also:
Constant Field Values

AND

public static final String AND
See Also:
Constant Field Values

OR

public static final String OR
See Also:
Constant Field Values

EQUAL

public static final String EQUAL
See Also:
Constant Field Values

GREATER_THAN

public static final String GREATER_THAN
See Also:
Constant Field Values

NULL

public static final String NULL
See Also:
Constant Field Values

NULL_NUMBER

public static final String NULL_NUMBER
See Also:
Constant Field Values

NULL_DATE

public static final String NULL_DATE
See Also:
Constant Field Values

AUTO_NAVI_ALIAS

public static final String AUTO_NAVI_ALIAS
See Also:
Constant Field Values

VIEW_PREFIX

public static final String VIEW_PREFIX
See Also:
Constant Field Values

COLUMNALIAS_SUFFIX

public static final String COLUMNALIAS_SUFFIX
See Also:
Constant Field Values

ZERO

public static final String ZERO
See Also:
Constant Field Values

TRUE_CONDITION

public static final String TRUE_CONDITION
See Also:
Constant Field Values

FALSE_CONDITION

public static final String FALSE_CONDITION
See Also:
Constant Field Values

DUMMY_TABLE

public static final String DUMMY_TABLE
See Also:
Constant Field Values

STRING_BUFFER_INITIAL_LENGTH

public static final int STRING_BUFFER_INITIAL_LENGTH
See Also:
Constant Field Values

DUMMY_BINDPARAMETER

public static final String DUMMY_BINDPARAMETER
See Also:
Constant Field Values

SET_EQUAL

public static final String SET_EQUAL
See Also:
Constant Field Values

EQUAL_PLACEHOLDER

public static final String EQUAL_PLACEHOLDER
See Also:
Constant Field Values

BIND_PLACEHOLDER

public static final String BIND_PLACEHOLDER
See Also:
Constant Field Values

ESCAPE

public static final String ESCAPE
See Also:
Constant Field Values

ESCAPE_CHAR

public static final char ESCAPE_CHAR
See Also:
Constant Field Values
Method Detail

getFunctionExpression

public String getFunctionExpression(String funcName,
                                    Vector args,
                                    boolean a_useBind,
                                    Vector a_tableInfos,
                                    Vector a_aliases,
                                    boolean a_outerJoin)
                             throws WTException
This method returns the DML string representation of the function.

Supported API: false

Parameters:
funcName - The logic function name
args -
a_useBind -
a_tableInfos -
a_aliases -
a_outerJoin -
Returns:
String
Throws:
WTException

getComputedColumnName

public String getComputedColumnName(String funcName,
                                    Vector args,
                                    Vector a_tableInfos,
                                    Vector a_aliases)
                             throws WTException
This method returns the computed column name for the function, if it exists. Otherwise, null is returned.

Supported API: false

Parameters:
funcName - The logic function name
args -
a_tableInfos -
a_aliases -
Returns:
String
Throws:
WTException

buildSelectStatement

public String buildSelectStatement(Vector a_tables,
                                   Vector a_aliases,
                                   ResultBuilder a_resultBuilder,
                                   boolean a_isDistinct,
                                   String a_select,
                                   String a_whereClause,
                                   String a_groupByClause,
                                   String a_havingClause,
                                   String a_orderByClause,
                                   boolean a_forUpdate,
                                   int[] a_joinOrder,
                                   Vector a_hintsVector,
                                   boolean[] a_fullPersistableTableIndicies,
                                   JoinClause a_joinClause,
                                   boolean a_useBind)
                            throws PersistenceException


Supported API: false

Parameters:
a_tables -
a_aliases -
a_resultBuilder -
a_isDistinct -
a_select -
a_whereClause -
a_groupByClause -
a_havingClause -
a_orderByClause -
a_forUpdate -
a_joinOrder -
a_hintsVector -
a_fullPersistableTableIndicies -
a_joinClause -
a_useBind -
Returns:
String
Throws:
PersistenceException

buildInsertStatement

public String buildInsertStatement(ClassInfo a_classInfo,
                                   ColumnDescriptor[] a_insertColumns)
                            throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
a_insertColumns -
Returns:
String
Throws:
PersistenceException

buildCall

public String buildCall(String a_procedureName,
                        int a_parameterCount,
                        boolean a_isFunction)


Supported API: false

Parameters:
a_procedureName -
a_parameterCount -
a_isFunction -
Returns:
String

buildCompoundStatement

public String buildCompoundStatement(String[] a_sqlStatements,
                                     String a_setOperator,
                                     String a_orderByClause)
                              throws PersistenceException


Supported API: false

Parameters:
a_sqlStatements -
a_setOperator -
a_orderByClause -
Returns:
String
Throws:
PersistenceException

buildLockStatement

public String buildLockStatement(ClassInfo a_classInfo)
                          throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
Returns:
String
Throws:
PersistenceException

buildTableLockStatement

public String buildTableLockStatement(ClassInfo a_classInfo)
                               throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
Returns:
String
Throws:
PersistenceException

buildEmptyDummySubSelectStatement

public String buildEmptyDummySubSelectStatement()
                                         throws WTException


Supported API: false

Returns:
String
Throws:
WTException

buildDummySubSelectStatement

public String buildDummySubSelectStatement(StatementSpec a_statementSpec,
                                           String a_alias)
                                    throws WTException


Supported API: false

Parameters:
a_statementSpec -
a_alias -
Returns:
String
Throws:
WTException

buildDeleteStatement

public void buildDeleteStatement(ClassInfo a_classInfo,
                                 WhereExpression a_where,
                                 boolean a_useBind,
                                 StringBuffer a_delete)
                          throws WTException
This method builds a DELETE-WHERE SQL statement.

Supported API: false

Parameters:
a_classInfo - Target class for the delete.
a_where - The WHERE clause to use in the statement.
a_useBind - Indicates if bind parameters should be used.
a_delete - The target string buffer to build the statement in.
Throws:
WTException

buildUpdateStatement

public String buildUpdateStatement(ClassInfo a_classInfo,
                                   ColumnDescriptor[] a_columns)
                            throws PersistenceException


Supported API: false

Parameters:
a_classInfo -
a_columns -
Returns:
String
Throws:
PersistenceException

appendQuote

public void appendQuote(Object a_value,
                        StringBuffer a_buffer)


Supported API: false

Parameters:
a_value -
a_buffer -

quote

public StringBuffer quote(Object a_value,
                          StringBuffer a_buffer)


Supported API: false

Parameters:
a_value -
a_buffer -
Returns:
StringBuffer

buildArrayTableExpression

public ArrayTableExpression[] buildArrayTableExpression(String[] selectListArray,
                                                        List a_oidList,
                                                        int offset,
                                                        int count,
                                                        int oidCount,
                                                        int a_groupFromIndex,
                                                        boolean useExtend,
                                                        boolean useRowExtension,
                                                        int rowExtensionNum,
                                                        long a_sessionId)
                                                 throws PersistenceException


Supported API: false

Parameters:
selectListArray -
a_oidList -
offset -
count -
oidCount -
a_groupFromIndex -
useExtend -
useRowExtension -
rowExtensionNum -
a_sessionId -
Returns:
ArrayTableExpression[]
Throws:
PersistenceException

buildArrayTableSelectList

public String[] buildArrayTableSelectList(int oidCount,
                                          int a_groupFromIndex,
                                          boolean useExtend,
                                          boolean useRowExtension,
                                          int rowExtensionNum)
                                   throws PersistenceException


Supported API: false

Parameters:
oidCount -
a_groupFromIndex -
useExtend -
useRowExtension -
rowExtensionNum -
Returns:
String[]
Throws:
PersistenceException

buildAttributeUpdateStatement

public String buildAttributeUpdateStatement(Persistable object,
                                            String[] attribute_names)
                                     throws PersistenceException


Supported API: false

Parameters:
object -
attribute_names -
Returns:
String
Throws:
PersistenceException

buildSubSelectStatement

public String buildSubSelectStatement(StatementSpec a_statementSpec,
                                      WTConnection a_connection)
                               throws WTException


Supported API: false

Parameters:
a_statementSpec -
a_connection -
Returns:
String
Throws:
WTException

buildStatements

public String[] buildStatements(StatementSpec a_statementSpec,
                                WTConnection a_connection)
                         throws WTException


Supported API: false

Parameters:
a_statementSpec -
a_connection -
Returns:
String[]
Throws:
WTException

buildBindParameters

public Object buildBindParameters(StatementSpec a_statementSpec)
                           throws WTException


Supported API: false

Parameters:
a_statementSpec -
Returns:
Object
Throws:
WTException

buildInsertStatement

public String buildInsertStatement(StatementSpec a_statementSpec,
                                   String tableName,
                                   WTConnection a_connection)
                            throws WTException


Supported API: false

Parameters:
a_statementSpec -
tableName -
a_connection -
Returns:
String
Throws:
WTException

buildInsertStatement

public String buildInsertStatement(String a_tableName,
                                   ColumnDescriptor[] a_insertColumns,
                                   Object[] a_values)
                            throws WTException
This method builds an INSERT statement.

Supported API: false

Parameters:
a_tableName - The table to INSERT into.
a_insertColumns - The columns of the table to INSERT into.
a_values - the values to INSERT. These values correspond to the specified columns. If the array is null, the length of the array is less than the index of an associated column, or the array element is null, then a bind parameter placeholder is used.
Returns:
String
Throws:
WTException

buildUpdateStatement

public boolean buildUpdateStatement(ClassInfo a_classInfo,
                                    WhereExpression a_where,
                                    boolean a_useBind,
                                    UpdateColumnExpression[] a_updateColumns,
                                    StringBuffer a_buffer)
                             throws WTException
This method builds the specified UPDATE statement.

Supported API: false

Parameters:
a_classInfo - The target class of the statement.
a_where - WhereExpression to use for the statement.
a_useBind - Indicates if bind parameters should be used.
a_updateColumns - Column expressions and values to use in the SET portion of the update statement.
a_buffer - Buffer to build the SQL string into.
Throws:
WTException

buildArrayTableExpression

public String buildArrayTableExpression(String a_alias,
                                        String a_type,
                                        String a_selectList,
                                        Object a_values)
This method is used to build the SQL string for ArrayTableExpression.

Supported API: false

Parameters:
a_alias -
a_type -
a_selectList -
a_values -
Returns:
String