## org.eclipse.datatools.connectivity.sqm.loader
Class JDBCCatalogLoader

    java.lang.Object
      org.eclipse.datatools.connectivity.sqm.loader.JDBCBaseLoader
          org.eclipse.datatools.connectivity.sqm.loader.JDBCCatalogLoader

public class JDBCCatalogLoader
extends JDBCBaseLoader

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

Since:
  1.0

Field Summary
`static java.lang.String` `COLUMN_TABLE_CAT` The column name containing the catalog name.

Constructor Summary
`JDBCCatalogLoader(ICatalogObject catalogObject)` This constructs the loader using a CatalogFilterProvider filter.
`JDBCCatalogLoader(ICatalogObject catalogObject, IConnectionFilterProvider connectionFilterProvider)`

Method Summary
`void` `clearCatalogs(java.util.Collection catalogs)` Removes the specified catalogs from the model.
`java.util.Collection` `loadCatalogs()` Loads the "catalog" objects from the database.

Methods inherited from class org.eclipse.datatools.connectivity.sqm.loader.JDBCBaseLoader
`getCatalogObject`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COLUMN_TABLE_CAT

    public static final java.lang.String COLUMN_TABLE_CAT

  The column name containing the catalog name.

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

Constructor Detail

### JDBCCatalogLoader

    public JDBCCatalogLoader(ICatalogObject catalogObject)

  This constructs the loader using a CatalogFilterProvider filter.

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

### JDBCCatalogLoader

    public JDBCCatalogLoader(ICatalogObject catalogObject,
                             IConnectionFilterProvider connectionFilterProvider)

Parameters:
  `catalogObject` - the Database object upon which this loader operates.
  `connectionFilterProvider` - the filter provider used for filtering the "catalog" objects being loaded

Method Detail

### loadCatalogs

    public java.util.Collection loadCatalogs()
                                      throws java.sql.SQLException

  Loads the "catalog" objects from the database. This method uses the result set from createResultSet() to load the "catalog" objects from the server. Row handling for the result set is delegated to processRow(). Catalog objects are created using the factory method, createCatalog(). If no catalogs are loaded, the loader assumes catalogs are not supported and creates a default Catalog object with an empty name. (This is mimics the behavior of the JDBC meta-data API where objects not belonging to a catalog are associated with a "" named catalog.) This method should only be overridden as a last resort when the desired behavior cannot be acheived by overriding createResultSet(), closeResultSet(), processRow(), createCatalog() and initialize().

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

### clearCatalogs

    public void clearCatalogs(java.util.Collection catalogs)

  Removes the specified catalogs from the model.

  Parameters:
    `catalogs` - the catalogs to be removed from the model.

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