org.eclipse.datatools.connectivity.sqm.loader
Class JDBCSchemaLoader

java.lang.Object
  extended byorg.eclipse.datatools.connectivity.sqm.loader.JDBCBaseLoader
      extended byorg.eclipse.datatools.connectivity.sqm.loader.JDBCSchemaLoader

public class JDBCSchemaLoader
extends JDBCBaseLoader

Base loader implementation for loading a database's schema objects. This class may be specialized as necessary to meet a particular vendor's needs.


Field Summary
static java.lang.String COLUMN_TABLE_CATALOG
          The column name containing the schema's catalog name.
static java.lang.String COLUMN_TABLE_SCHEM
          The column name containing the schema's name.
 
Constructor Summary
JDBCSchemaLoader(ICatalogObject catalogObject)
          This constructs the loader using a SchemaFilterProvider filter.
JDBCSchemaLoader(ICatalogObject catalogObject, IConnectionFilterProvider connectionFilterProvider)
           
 
Method Summary
 void clearSchemas(java.util.List schemas)
          Removes the specified schema from the model.
 java.util.List loadSchemas()
          Deprecated. see loadSchemas(List, Collection)
 void loadSchemas(java.util.List containmentList, java.util.Collection existingSchemas)
          Loads the "schema" objects from the database.
 
Methods inherited from class org.eclipse.datatools.connectivity.sqm.loader.JDBCBaseLoader
getCatalogObject, setCatalogObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_TABLE_SCHEM

public static final java.lang.String COLUMN_TABLE_SCHEM
The column name containing the schema's name.

See Also:
java.sql.DatabaseMetaData.getSchemas(), Constant Field Values

COLUMN_TABLE_CATALOG

public static final java.lang.String COLUMN_TABLE_CATALOG
The column name containing the schema's catalog name.

See Also:
java.sql.DatabaseMetaData.getSchemas(), Constant Field Values
Constructor Detail

JDBCSchemaLoader

public JDBCSchemaLoader(ICatalogObject catalogObject)
This constructs the loader using a SchemaFilterProvider filter.

Parameters:
catalogObject - the Catalog object upon which this loader operates.

JDBCSchemaLoader

public JDBCSchemaLoader(ICatalogObject catalogObject,
                        IConnectionFilterProvider connectionFilterProvider)
Parameters:
catalogObject - the Catalog object upon which this loader operates.
connectionFilterProvider - the filter provider used for filtering the "schema" objects being loaded
Method Detail

loadSchemas

public java.util.List loadSchemas()
                           throws java.sql.SQLException
Deprecated. see loadSchemas(List, Collection)

Returns:
a collection of Schema objects
Throws:
java.sql.SQLException - if an error occurred during loading.

loadSchemas

public void loadSchemas(java.util.List containmentList,
                        java.util.Collection existingSchemas)
                 throws java.sql.SQLException
Loads the "schema" objects from the database. This method uses the result set from createResultSet() to load the "schema" objects from the server. This method first checks the name of the "schema" to determine whether or not it should be filtered. If it is not filtered, it checks to see if an object with that name was loaded previously. If it finds an existing object, it refreshes that object and adds it to the containment list. If the named object does not exist, the result set is passed to processRow(). Schema objects are created using the factory method, createSchema() and initialized through the initialize() method. This method should only be overridden as a last resort when the desired behavior cannot be acheived by overriding createResultSet(), closeResultSet(), processRow(), createSchema() and initialize().

Parameters:
containmentList - the containment list held by parent
existingSchemas - the catalog objects which were previously loaded
Throws:
java.sql.SQLException - if an error occurred during loading.

clearSchemas

public void clearSchemas(java.util.List schemas)
Removes the specified schema from the model.

Parameters:
schemas - the schemas to be removed from the model.


Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.