| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.modelbase.sql.query.helper.DatabaseHelper
public class DatabaseHelper
This class provides a set of utility methods for dealing with RDBDatabase objects and associated objects such as RDBTable and RDBColumn.
| Constructor Summary | |
|---|---|
| DatabaseHelper() | |
| Method Summary | |
|---|---|
| static Procedure | findProcedure(Schema schema,
              java.lang.String procName)Finds and returns a Procedure object with the given name associated with the given Schema object. | 
| static Schema | findSchema(Database database,
           java.lang.String schemaName)Finds a Schemaby its name in a givenDatabase. | 
| static Table | findTable(Schema schema,
          java.lang.String tableName)Finds a Tableby its name in a givenSchema,
 the giventableNameis not case sensitive. | 
| static void | resolveTableReferenceRDBTable(TableInDatabase aTableInDB,
                              Database aDatabase,
                              java.lang.String aDefaultSchemaName)Resolves the given table references so that it has the correct RDBTable attached to it. | 
| static void | resolveTableReferenceRDBTables(java.util.List aTableRefList,
                               Database aDatabase,
                               java.lang.String aDefaultSchemaName)Deprecated. table reference resolving is now done by post parse processer, use org.eclipse.datatools.modelbase.parsers.sql.query.postparse.TableReferenceResolverwithorg.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager | 
| static void | resolveTableReferenceRDBTables(QueryStatement aSQLStmt,
                               Database aDatabase,
                               java.lang.String aDefaultSchemaName)Deprecated. table reference resolving is now done by post parse processer, use org.eclipse.datatools.modelbase.parsers.sql.query.postparse.TableReferenceResolverwithorg.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DatabaseHelper()
| Method Detail | 
|---|
public static void resolveTableReferenceRDBTables(QueryStatement aSQLStmt,
                                                  Database aDatabase,
                                                  java.lang.String aDefaultSchemaName)
org.eclipse.datatools.modelbase.parsers.sql.query.postparse.TableReferenceResolver
 with org.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager
aSQLStmt - a SQL statement which's table refernces are to be resolvedaDatabase - a Database to use to get RDBTablesaDefaultSchemaName - the name of the Schema the tables will be looked up for,
            if the tables are not already qualified
public static void resolveTableReferenceRDBTables(java.util.List aTableRefList,
                                                  Database aDatabase,
                                                  java.lang.String aDefaultSchemaName)
org.eclipse.datatools.modelbase.parsers.sql.query.postparse.TableReferenceResolver
 with org.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager
aTableRefList - a list of table references to be resolvedaDatabase - an Database to use to get RDBTablesaDefaultSchemaName - the name of the Schema the tables will be looked up for, if the tables 
            are not already qualified
public static void resolveTableReferenceRDBTable(TableInDatabase aTableInDB,
                                                 Database aDatabase,
                                                 java.lang.String aDefaultSchemaName)
aTableInDB - a table references to be resolvedaDatabase - a Database object to use to get RDBTablesaDefaultSchemaName - the default schema name to use to look up
 tables in the database for tables that are not already qualified
public static Procedure findProcedure(Schema schema,
                                      java.lang.String procName)
schema - the Schema object to use to find the Procedure objectprocName - the name of the Procedure object to find
public static Schema findSchema(Database database,
                                java.lang.String schemaName)
Schema by its name in a given Database.
 If the given schemaName is not delimited, the search is not case 
 sensitive.
database - the Database to find Schemas inschemaName - the String name of the Schema to find
Schema found or null if no 
      corresponding Schema was found
public static Table findTable(Schema schema,
                              java.lang.String tableName)
Table by its name in a given Schema,
 the given tableName is not case sensitive.  
 Look at findSchema(Database, String) to see how 
 the Schema can be found in a Database.
schema - the Schema to find a Table intableName - the String name of the Table to find
Table found or null| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||