| java.lang.Object org.netbeans.modules.sql.framework.codegen.base.BaseStatements
All known Subclasses: org.netbeans.modules.sql.framework.codegen.sqlserver.SqlServerStatements, org.netbeans.modules.sql.framework.codegen.mysql.MySQLStatements, org.netbeans.modules.sql.framework.codegen.postgreSQL.PostgreSQLStatements, org.netbeans.modules.sql.framework.codegen.derby.DerbyStatements, org.netbeans.modules.sql.framework.codegen.axion.AxionStatements, org.netbeans.modules.sql.framework.codegen.oracle8.Oracle8Statements, org.netbeans.modules.sql.framework.codegen.db2v7.DB2V7Statements, org.netbeans.modules.sql.framework.codegen.jdbc.JdbcStatements,
BaseStatements | public class BaseStatements implements Statements(Code) | | author: Ritesh Adval author: Ahimanikya Satapathy version: $Revision$ |
Inner Class :public static class UpdateSetMapping | |
Method Summary | |
protected String | appendSQLForIntegrityCheck(TargetTable targetTable, StatementContext context) | final protected Boolean | areDistinctRowsRequired(TargetTable targetTable) Indicates whether one or more of the source tables, if any, associated with the given
TargetTable require the use of the DISTINCT keyword when selecting rows from them. | protected List<ColumnIdentifier> | createColumnIdentifiersFromSourceColumns(List columnTobeAliased, StatementContext context, int startIndex) | protected List<ColumnIdentifier> | createColumnIdentifiersFromSourceColumns(List columnTobeAliased, StatementContext context, int startIndex, String aliasPrefix) | protected List<ColumnIdentifier> | createGroupByIdentifierList(SQLObject object, StatementContext context) Gets List of ColumnIdentifiers representing all columns in a source table. | public List<ResolvedMapping> | createResolvedMappings(TargetTable targetTable, boolean excludeKeyColumns, StatementContext context) | protected SQLPart | createSQLPart(String sqlString, String key) | protected List<ColumnIdentifier> | createSourceIdentifierList(SourceTable sourceTable, StatementContext context) Gets List of ColumnIdentifiers representing all columns in a source table. | protected List<ColumnIdentifier> | createSourceIdentifierList(TargetTable targetTable, StatementContext context) | protected List<ColumnIdentifier> | createTargetIdentifierList(TargetTable targetTable, StatementContext context) | protected List<ColumnIdentifier> | getColIdsFromRM(List<ResolvedMapping> rmList) | protected List | getConditionColumnsNotInList(SQLCondition condition, List origList, StatementContext context) Apart from returning Source columns in the condition but not in the list., will also set context
with JDBC type for these missing columns. | protected List | getConditionColumnsNotInList(SQLCondition condition, List origList) | public Map | getCorrelatedUpdateStatement(TargetTable targetTable, StatementContext context) | public SQLPart | getCreateLogSummaryTableStatement(boolean useMemoryTable) Creates SQL statement to generate log summary table.
Parameters: useMemoryTable - true if statement should use syntax for Axion memory table,false if a delimited flatfile table is required. | public SQLPart | getCreateStatement(SQLDBTable table, StatementContext context) | public SQLPart | getDefragStatement(SQLDBTable table, StatementContext context) | public SQLPart | getDeleteInvalidRowFromSummaryTableStatement(TargetTable table) | public SQLPart | getDeleteStatement(SQLDBTable table, StatementContext context) | public SQLPart | getDropStatement(SQLDBTable table, StatementContext context) | protected String | getFromStatementContent(TargetTable targetTable, StatementContext context) | protected String | getFromStatementContentForTarget(TargetTable targetTable, int joinType, StatementContext context) | protected String | getHavingCondition(SQLGroupBy groupBy, StatementContext context) | public SQLPart | getInitializationStatements(StatementContext context) | public SQLPart | getInsertSelectStatement(TargetTable targetTable, StatementContext context) | public SQLPart | getInsertStartDateIntoSummaryTableStatement(TargetTable table, StatementContext context) | public SQLPart | getMergeStatement(TargetTable targetTable, StatementContext context) | public SQLPart | getOnePassSelectStatement(TargetTable targetTable, StatementContext context) | public SQLPart | getPreparedInsertStatement(SQLDBTable table, StatementContext context) | public SQLPart | getRowCountStatement(SQLDBTable table, StatementContext context) | public SQLPart | getSelectExecutionIdFromSummaryTableStatement(TargetTable table, StatementContext context) | public SQLPart | getSelectStatement(SourceTable sourceTable, StatementContext context) | public SQLPart | getSelectStatement(SQLJoinView joinView, StatementContext context) | public SQLPart | getSelectStatement(SQLJoinOperator joinOp, StatementContext context) | public SQLPart | getSelectStatement(TargetTable targetTable, StatementContext context) | protected List | getSourceColsDirectlyMapped(TargetTable tt, StatementContext context) Returns Source Table columns directly mapped to target table. | protected List | getSourceColsDirectlyMapped(TargetTable tt) | protected String | getSourceWhereCondition(List sTables, StatementContext context) | public SQLPart | getStaticInsertStatement(TargetTable targetTable, StatementContext context) | public String | getSummaryTableName() | public SQLPart | getTableExistsStatement(SQLDBTable table, StatementContext context) | protected String | getTableNameForStatisticsMetadata(TargetTable table, StatementContext context) Creates appropriate table name from the given TargetTable and StatementContext
state to use in updating statistics metadata tables. | protected String | getTargetJoinClause(TargetTable targetTable, int joinType, StatementContext context) | protected String | getTargetWhereCondition(TargetTable targetTable, StatementContext context) | public SQLPart | getTruncateStatement(SQLDBTable targetTable, StatementContext context) | protected String | getUnqualifiedTableName(SQLDBTable dbTable, StatementContext context) Gets table name associated with the given SQLDBTable, without qualifying
delimiters. | public SQLPart | getUpdateEndDateInSummaryTableStatement(TargetTable table, StatementContext context) | public SQLPart | getUpdateStatement(TargetTable targetTable, StatementContext context) | protected String | getWhereCondition(TargetTable targetTable, StatementContext context) | public SQLPart | normalizeSQLForExecution(SQLPart rawSQLPart) Implements no-op version of method signature - concrete subclasses should override to
perform any formatting of the SQL statement in rawSQLPart that is required
for a particular JDBC driver to accept and execute it. | protected void | populateAnsiMergeStatement(TargetTable targetTable, StatementContext context, VelocityContext vContext) | protected void | populateContextForGroupByAndHaving(SQLObject object, StatementContext context, VelocityContext vContext) | protected void | populateContextForInsertSelect(TargetTable targetTable, StatementContext context, VelocityContext vContext) | protected void | populateContextForStaticUpdate(TargetTable targetTable, StatementContext context, VelocityContext vContext) Populates given VelocityContext with sufficient information to generate a static
update statement for the given TargetTable, using hints from the given
StatementContext. | protected void | populateContextForUpdate(TargetTable targetTable, StatementContext context, VelocityContext vContext) | protected String | replaceColumnNamesWithAliases(List colIdentifier, String sql) |
LOG_SUMMARY_TABLE_NAME | final public static String LOG_SUMMARY_TABLE_NAME(Code) | | |
SOURCE_COLUMN_IDENTIFIER_ALIAS_PREFIX | final protected static String SOURCE_COLUMN_IDENTIFIER_ALIAS_PREFIX(Code) | | |
SRC_EXP_TO_JDBC_TYPE_MAP | final protected static String SRC_EXP_TO_JDBC_TYPE_MAP(Code) | | |
TARGET_COLUMN_IDENTIFIER_ALIAS_PREFIX | final protected static String TARGET_COLUMN_IDENTIFIER_ALIAS_PREFIX(Code) | | |
areDistinctRowsRequired | final protected Boolean areDistinctRowsRequired(TargetTable targetTable) throws BaseException(Code) | | Indicates whether one or more of the source tables, if any, associated with the given
TargetTable require the use of the DISTINCT keyword when selecting rows from them.
Parameters: targetTable - TargetTable whose associated SourceTables are to be interrogated Boolean.TRUE if at least one table requires the DISTINCT keyword; Boolean.FALSEotherwise |
createGroupByIdentifierList | protected List<ColumnIdentifier> createGroupByIdentifierList(SQLObject object, StatementContext context) throws BaseException(Code) | | Gets List of ColumnIdentifiers representing all columns in a source table.
Parameters: sourceTable - Parameters: context - throws: BaseException - |
createSQLPart | protected SQLPart createSQLPart(String sqlString, String key)(Code) | | Creates SQLPart Object
Parameters: sqlString - the generated SQL statement string Parameters: key - key used in the statement map SQLPart |
createSourceIdentifierList | protected List<ColumnIdentifier> createSourceIdentifierList(SourceTable sourceTable, StatementContext context) throws BaseException(Code) | | Gets List of ColumnIdentifiers representing all columns in a source table.
Parameters: sourceTable - Parameters: context - throws: BaseException - |
getConditionColumnsNotInList | protected List getConditionColumnsNotInList(SQLCondition condition, List origList, StatementContext context)(Code) | | Apart from returning Source columns in the condition but not in the list., will also set context
with JDBC type for these missing columns.
Parameters: condition - Parameters: origList - Parameters: context - |
getCreateLogSummaryTableStatement | public SQLPart getCreateLogSummaryTableStatement(boolean useMemoryTable) throws BaseException(Code) | | Creates SQL statement to generate log summary table.
Parameters: useMemoryTable - true if statement should use syntax for Axion memory table,false if a delimited flatfile table is required. SQLPart containing appropriate create statement for summary table |
getDeleteInvalidRowFromSummaryTableStatement | public SQLPart getDeleteInvalidRowFromSummaryTableStatement(TargetTable table) throws BaseException(Code) | | |
getInitializationStatements | public SQLPart getInitializationStatements(StatementContext context) throws BaseException(Code) | | |
getInsertStartDateIntoSummaryTableStatement | public SQLPart getInsertStartDateIntoSummaryTableStatement(TargetTable table, StatementContext context) throws BaseException(Code) | | Parameters: table - Parameters: logTableName - |
getSelectExecutionIdFromSummaryTableStatement | public SQLPart getSelectExecutionIdFromSummaryTableStatement(TargetTable table, StatementContext context) throws BaseException(Code) | | |
getSourceColsDirectlyMapped | protected List getSourceColsDirectlyMapped(TargetTable tt, StatementContext context)(Code) | | Returns Source Table columns directly mapped to target table.
Also updates JDBC types of all the mapped target columns whether directly or thru expression.
Parameters: tt - Parameters: context - |
getSourceWhereCondition | protected String getSourceWhereCondition(List sTables, StatementContext context) throws BaseException(Code) | | Parameters: sTables - Parameters: context - throws: BaseException - |
getSummaryTableName | public String getSummaryTableName()(Code) | | |
getTableNameForStatisticsMetadata | protected String getTableNameForStatisticsMetadata(TargetTable table, StatementContext context)(Code) | | Creates appropriate table name from the given TargetTable and StatementContext
state to use in updating statistics metadata tables.
Parameters: table - TargetTable whose reference name is to be created Parameters: context - StatementContext to use in determing appropriate reference name appropriate table name to use as a reference in statistics metadata tables. |
getUnqualifiedTableName | protected String getUnqualifiedTableName(SQLDBTable dbTable, StatementContext context)(Code) | | Gets table name associated with the given SQLDBTable, without qualifying
delimiters.
Parameters: dbTable - SQLDBTable whose name is to be returned Parameters: context - StatementContext |
getUpdateEndDateInSummaryTableStatement | public SQLPart getUpdateEndDateInSummaryTableStatement(TargetTable table, StatementContext context) throws BaseException(Code) | | |
normalizeSQLForExecution | public SQLPart normalizeSQLForExecution(SQLPart rawSQLPart)(Code) | | Implements no-op version of method signature - concrete subclasses should override to
perform any formatting of the SQL statement in rawSQLPart that is required
for a particular JDBC driver to accept and execute it.
Parameters: rawSQLPart - SQLPart containing SQL statement to be normalized SQLPart containing normalized SQL statement |
populateAnsiMergeStatement | protected void populateAnsiMergeStatement(TargetTable targetTable, StatementContext context, VelocityContext vContext) throws BaseException(Code) | | |
populateContextForGroupByAndHaving | protected void populateContextForGroupByAndHaving(SQLObject object, StatementContext context, VelocityContext vContext) throws BaseException(Code) | | |
populateContextForInsertSelect | protected void populateContextForInsertSelect(TargetTable targetTable, StatementContext context, VelocityContext vContext) throws BaseException(Code) | | |
populateContextForStaticUpdate | protected void populateContextForStaticUpdate(TargetTable targetTable, StatementContext context, VelocityContext vContext) throws BaseException(Code) | | Populates given VelocityContext with sufficient information to generate a static
update statement for the given TargetTable, using hints from the given
StatementContext.
Parameters: targetTable - Parameters: context - Parameters: context2 - |
populateContextForUpdate | protected void populateContextForUpdate(TargetTable targetTable, StatementContext context, VelocityContext vContext) throws BaseException(Code) | | |
replaceColumnNamesWithAliases | protected String replaceColumnNamesWithAliases(List colIdentifier, String sql) throws BaseException(Code) | | |
|
|