## org.eclipse.datatools.modelbase.sql.query.helper
Class DatabaseHelper

    java.lang.Object
      org.eclipse.datatools.modelbase.sql.query.helper.DatabaseHelper

    public class DatabaseHelper

extends java.lang.Object

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 `Schema` by its name in a given `Database`.
`static Table` `findTable(Schema schema, java.lang.String tableName)` Finds a `Table` by its name in a given `Schema`, the given `tableName` is 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.TableReferenceResolver` with `org.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.TableReferenceResolver` with `org.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

### DatabaseHelper

    public DatabaseHelper()

Method Detail

### resolveTableReferenceRDBTables

    public 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.TableReferenceResolver` with `org.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager`

  DO NOT USE ANYMORE IN CONNECTION WITH org.eclipse.datatools.sqltools.parsers.sql.query PARSER! Resolves the table references in the From clause of the given query so that each has the correct RDBTable attached to it.

  Parameters:
    `aSQLStmt` - a SQL statement which's table refernces are to be resolved
    `aDatabase` - a Database to use to get RDBTables
    `aDefaultSchemaName` - the name of the Schema the tables will be looked up for, if the tables are not already qualified

### resolveTableReferenceRDBTables

    public 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.TableReferenceResolver` with `org.eclipse.datatools.modelbase.parsers.sql.query.SQLQueryParserManager`

  DO NOT USE ANYMORE IN CONNECTION WITH org.eclipse.datatools.sqltools.parsers.sql.query PARSER! Resolves the table references in the From clause of the given query so that each has the correct RDBTable attached to it.

  Parameters:
    `aTableRefList` - a list of table references to be resolved
    `aDatabase` - an Database to use to get RDBTables
    `aDefaultSchemaName` - the name of the Schema the tables will be looked up for, if the tables are not already qualified

### resolveTableReferenceRDBTable

    public 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.

  Parameters:
    `aTableInDB` - a table references to be resolved
    `aDatabase` - a Database object to use to get RDBTables
    `aDefaultSchemaName` - the default schema name to use to look up tables in the database for tables that are not already qualified

### findProcedure

    public 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.

  Parameters:
    `schema` - the Schema object to use to find the Procedure object
    `procName` - the name of the Procedure object to find
  Returns:
    the found Procedure object, or null if not found

### findSchema

    public static Schema findSchema(Database database,
                                    java.lang.String schemaName)

  Finds a `Schema` by its name in a given `Database`. If the given `schemaName` is not delimited, the search is not case sensitive.

  Parameters:
    `database` - the `Database` to find `Schema`s in
    `schemaName` - the String name of the `Schema` to find
  Returns:
    the `Schema` found or `null` if no corresponding `Schema` was found

### findTable

    public static Table findTable(Schema schema,
                                  java.lang.String tableName)

  Finds a `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`.

  Parameters:
    `schema` - the `Schema` to find a `Table` in
    `tableName` - the String name of the `Table` to find
  Returns:
    the `Table` found or null