Java Doc for BaseStatements.java in  » IDE-Netbeans » etl.project » org » netbeans » modules » sql » framework » codegen » base » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » etl.project » org.netbeans.modules.sql.framework.codegen.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
final public static  StringLOG_SUMMARY_TABLE_NAME
    
final protected static  StringSOURCE_COLUMN_IDENTIFIER_ALIAS_PREFIX
    
final protected static  StringSRC_EXP_TO_JDBC_TYPE_MAP
    
final protected static  StringTARGET_COLUMN_IDENTIFIER_ALIAS_PREFIX
    
protected  AbstractDBdb
    
protected  AbstractGeneratorFactorygenFactory
    

Constructor Summary
public  BaseStatements(AbstractDB database)
    

Method Summary
protected  StringappendSQLForIntegrityCheck(TargetTable targetTable, StatementContext context)
    
final protected  BooleanareDistinctRowsRequired(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  SQLPartcreateSQLPart(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  ListgetConditionColumnsNotInList(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  ListgetConditionColumnsNotInList(SQLCondition condition, List origList)
    
public  MapgetCorrelatedUpdateStatement(TargetTable targetTable, StatementContext context)
    
public  SQLPartgetCreateLogSummaryTableStatement(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  SQLPartgetCreateStatement(SQLDBTable table, StatementContext context)
    
public  SQLPartgetDefragStatement(SQLDBTable table, StatementContext context)
    
public  SQLPartgetDeleteInvalidRowFromSummaryTableStatement(TargetTable table)
    
public  SQLPartgetDeleteStatement(SQLDBTable table, StatementContext context)
    
public  SQLPartgetDropStatement(SQLDBTable table, StatementContext context)
    
protected  StringgetFromStatementContent(TargetTable targetTable, StatementContext context)
    
protected  StringgetFromStatementContentForTarget(TargetTable targetTable, int joinType, StatementContext context)
    
protected  StringgetHavingCondition(SQLGroupBy groupBy, StatementContext context)
    
public  SQLPartgetInitializationStatements(StatementContext context)
    
public  SQLPartgetInsertSelectStatement(TargetTable targetTable, StatementContext context)
    
public  SQLPartgetInsertStartDateIntoSummaryTableStatement(TargetTable table, StatementContext context)
    
public  SQLPartgetMergeStatement(TargetTable targetTable, StatementContext context)
    
public  SQLPartgetOnePassSelectStatement(TargetTable targetTable, StatementContext context)
    
public  SQLPartgetPreparedInsertStatement(SQLDBTable table, StatementContext context)
    
public  SQLPartgetRowCountStatement(SQLDBTable table, StatementContext context)
    
public  SQLPartgetSelectExecutionIdFromSummaryTableStatement(TargetTable table, StatementContext context)
    
public  SQLPartgetSelectStatement(SourceTable sourceTable, StatementContext context)
    
public  SQLPartgetSelectStatement(SQLJoinView joinView, StatementContext context)
    
public  SQLPartgetSelectStatement(SQLJoinOperator joinOp, StatementContext context)
    
public  SQLPartgetSelectStatement(TargetTable targetTable, StatementContext context)
    
protected  ListgetSourceColsDirectlyMapped(TargetTable tt, StatementContext context)
     Returns Source Table columns directly mapped to target table.
protected  ListgetSourceColsDirectlyMapped(TargetTable tt)
    
protected  StringgetSourceWhereCondition(List sTables, StatementContext context)
    
public  SQLPartgetStaticInsertStatement(TargetTable targetTable, StatementContext context)
    
public  StringgetSummaryTableName()
    
public  SQLPartgetTableExistsStatement(SQLDBTable table, StatementContext context)
    
protected  StringgetTableNameForStatisticsMetadata(TargetTable table, StatementContext context)
     Creates appropriate table name from the given TargetTable and StatementContext state to use in updating statistics metadata tables.
protected  StringgetTargetJoinClause(TargetTable targetTable, int joinType, StatementContext context)
    
protected  StringgetTargetWhereCondition(TargetTable targetTable, StatementContext context)
    
public  SQLPartgetTruncateStatement(SQLDBTable targetTable, StatementContext context)
    
protected  StringgetUnqualifiedTableName(SQLDBTable dbTable, StatementContext context)
     Gets table name associated with the given SQLDBTable, without qualifying delimiters.
public  SQLPartgetUpdateEndDateInSummaryTableStatement(TargetTable table, StatementContext context)
    
public  SQLPartgetUpdateStatement(TargetTable targetTable, StatementContext context)
    
protected  StringgetWhereCondition(TargetTable targetTable, StatementContext context)
    
public  SQLPartnormalizeSQLForExecution(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  voidpopulateAnsiMergeStatement(TargetTable targetTable, StatementContext context, VelocityContext vContext)
    
protected  voidpopulateContextForGroupByAndHaving(SQLObject object, StatementContext context, VelocityContext vContext)
    
protected  voidpopulateContextForInsertSelect(TargetTable targetTable, StatementContext context, VelocityContext vContext)
    
protected  voidpopulateContextForStaticUpdate(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  voidpopulateContextForUpdate(TargetTable targetTable, StatementContext context, VelocityContext vContext)
    
protected  StringreplaceColumnNamesWithAliases(List colIdentifier, String sql)
    

Field Detail
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)



db
protected AbstractDB db(Code)



genFactory
protected AbstractGeneratorFactory genFactory(Code)




Constructor Detail
BaseStatements
public BaseStatements(AbstractDB database)(Code)




Method Detail
appendSQLForIntegrityCheck
protected String appendSQLForIntegrityCheck(TargetTable targetTable, StatementContext context) throws BaseException(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



createColumnIdentifiersFromSourceColumns
protected List<ColumnIdentifier> createColumnIdentifiersFromSourceColumns(List columnTobeAliased, StatementContext context, int startIndex) throws BaseException(Code)



createColumnIdentifiersFromSourceColumns
protected List<ColumnIdentifier> createColumnIdentifiersFromSourceColumns(List columnTobeAliased, StatementContext context, int startIndex, String aliasPrefix) throws BaseException(Code)



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 -



createResolvedMappings
public List<ResolvedMapping> createResolvedMappings(TargetTable targetTable, boolean excludeKeyColumns, StatementContext context) throws BaseException(Code)



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 -



createSourceIdentifierList
protected List<ColumnIdentifier> createSourceIdentifierList(TargetTable targetTable, StatementContext context) throws BaseException(Code)



createTargetIdentifierList
protected List<ColumnIdentifier> createTargetIdentifierList(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getColIdsFromRM
protected List<ColumnIdentifier> getColIdsFromRM(List<ResolvedMapping> rmList) throws BaseException(Code)



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 -



getConditionColumnsNotInList
protected List getConditionColumnsNotInList(SQLCondition condition, List origList)(Code)



getCorrelatedUpdateStatement
public Map getCorrelatedUpdateStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



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



getCreateStatement
public SQLPart getCreateStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getDefragStatement
public SQLPart getDefragStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getDeleteInvalidRowFromSummaryTableStatement
public SQLPart getDeleteInvalidRowFromSummaryTableStatement(TargetTable table) throws BaseException(Code)



getDeleteStatement
public SQLPart getDeleteStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getDropStatement
public SQLPart getDropStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getFromStatementContent
protected String getFromStatementContent(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getFromStatementContentForTarget
protected String getFromStatementContentForTarget(TargetTable targetTable, int joinType, StatementContext context) throws BaseException(Code)



getHavingCondition
protected String getHavingCondition(SQLGroupBy groupBy, StatementContext context) throws BaseException(Code)



getInitializationStatements
public SQLPart getInitializationStatements(StatementContext context) throws BaseException(Code)



getInsertSelectStatement
public SQLPart getInsertSelectStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getInsertStartDateIntoSummaryTableStatement
public SQLPart getInsertStartDateIntoSummaryTableStatement(TargetTable table, StatementContext context) throws BaseException(Code)

Parameters:
  table -
Parameters:
  logTableName -



getMergeStatement
public SQLPart getMergeStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getOnePassSelectStatement
public SQLPart getOnePassSelectStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getPreparedInsertStatement
public SQLPart getPreparedInsertStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getRowCountStatement
public SQLPart getRowCountStatement(SQLDBTable table, StatementContext context) throws BaseException(Code)



getSelectExecutionIdFromSummaryTableStatement
public SQLPart getSelectExecutionIdFromSummaryTableStatement(TargetTable table, StatementContext context) throws BaseException(Code)



getSelectStatement
public SQLPart getSelectStatement(SourceTable sourceTable, StatementContext context) throws BaseException(Code)



getSelectStatement
public SQLPart getSelectStatement(SQLJoinView joinView, StatementContext context) throws BaseException(Code)



getSelectStatement
public SQLPart getSelectStatement(SQLJoinOperator joinOp, StatementContext context) throws BaseException(Code)



getSelectStatement
public SQLPart getSelectStatement(TargetTable targetTable, 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 -



getSourceColsDirectlyMapped
protected List getSourceColsDirectlyMapped(TargetTable tt)(Code)



getSourceWhereCondition
protected String getSourceWhereCondition(List sTables, StatementContext context) throws BaseException(Code)

Parameters:
  sTables -
Parameters:
  context -
throws:
  BaseException -



getStaticInsertStatement
public SQLPart getStaticInsertStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getSummaryTableName
public String getSummaryTableName()(Code)



getTableExistsStatement
public SQLPart getTableExistsStatement(SQLDBTable table, StatementContext context) throws BaseException(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.



getTargetJoinClause
protected String getTargetJoinClause(TargetTable targetTable, int joinType, StatementContext context) throws BaseException(Code)



getTargetWhereCondition
protected String getTargetWhereCondition(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getTruncateStatement
public SQLPart getTruncateStatement(SQLDBTable targetTable, StatementContext context) throws BaseException(Code)



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)



getUpdateStatement
public SQLPart getUpdateStatement(TargetTable targetTable, StatementContext context) throws BaseException(Code)



getWhereCondition
protected String getWhereCondition(TargetTable targetTable, 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)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

ww___w___._ja_v__a__2s__._co__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.