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

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

public class JDBCUserDefinedTypeLoader
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

Nested Class Summary
static class JDBCUserDefinedTypeLoader.DistinctTypeFactory
          Base factory implementation for distinct UDTs.
static interface JDBCUserDefinedTypeLoader.IUDTFactory
          Interface for providing creation logic for UDTs.
static class JDBCUserDefinedTypeLoader.StructTypeFactory
          Base factory implementation for struct UDTs.
 
Field Summary
static java.lang.String COLUMN_BASE_TYPE
          The column name containing the UDT's base type.
static java.lang.String COLUMN_CLASS_NAME
          The column name containing the UDT's class name.
static java.lang.String COLUMN_DATA_TYPE
          The column name containing the UDT's data type.
static java.lang.String COLUMN_REMARKS
          The column name containing the UDT's description.
static java.lang.String COLUMN_TYPE_NAME
          The column name containing the UDT's name.
 
Constructor Summary
JDBCUserDefinedTypeLoader(ICatalogObject catalogObject)
          This constructs the loader using the default DistinctTypeFactory StructTypeFactory, no Java type factory, and uses the ConnectionFilter.USER_DEFINED_TYPE_FILTER filter.
JDBCUserDefinedTypeLoader(ICatalogObject catalogObject, IConnectionFilterProvider connectionFilterProvider)
          This constructs the loader using the default DistinctTypeFactory StructTypeFactory, and no Java type factory.
JDBCUserDefinedTypeLoader(ICatalogObject catalogObject, IConnectionFilterProvider connectionFilterProvider, JDBCUserDefinedTypeLoader.IUDTFactory distinctTypeFactory, JDBCUserDefinedTypeLoader.IUDTFactory structTypeFactory, JDBCUserDefinedTypeLoader.IUDTFactory javaTypeFactory)
           
 
Method Summary
 void clearUDTs(java.util.List existingUDTs)
          Removes the specified UDTs from the model.
 java.util.List loadUDTs()
          Deprecated. see loadUDTs(List, Collection)
 void loadUDTs(java.util.List containmentList, java.util.Collection existingUDTs)
          Loads the "UDT" 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_TYPE_NAME

public static final java.lang.String COLUMN_TYPE_NAME
The column name containing the UDT's name.

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

COLUMN_CLASS_NAME

public static final java.lang.String COLUMN_CLASS_NAME
The column name containing the UDT's class name.

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

COLUMN_DATA_TYPE

public static final java.lang.String COLUMN_DATA_TYPE
The column name containing the UDT's data type.

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

COLUMN_REMARKS

public static final java.lang.String COLUMN_REMARKS
The column name containing the UDT's description.

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

COLUMN_BASE_TYPE

public static final java.lang.String COLUMN_BASE_TYPE
The column name containing the UDT's base type.

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

JDBCUserDefinedTypeLoader

public JDBCUserDefinedTypeLoader(ICatalogObject catalogObject)
This constructs the loader using the default DistinctTypeFactory StructTypeFactory, no Java type factory, and uses the ConnectionFilter.USER_DEFINED_TYPE_FILTER filter.

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

JDBCUserDefinedTypeLoader

public JDBCUserDefinedTypeLoader(ICatalogObject catalogObject,
                                 IConnectionFilterProvider connectionFilterProvider)
This constructs the loader using the default DistinctTypeFactory StructTypeFactory, and no Java type factory.

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

JDBCUserDefinedTypeLoader

public JDBCUserDefinedTypeLoader(ICatalogObject catalogObject,
                                 IConnectionFilterProvider connectionFilterProvider,
                                 JDBCUserDefinedTypeLoader.IUDTFactory distinctTypeFactory,
                                 JDBCUserDefinedTypeLoader.IUDTFactory structTypeFactory,
                                 JDBCUserDefinedTypeLoader.IUDTFactory javaTypeFactory)
Parameters:
catalogObject - the Schema object upon which this loader operates.
connectionFilterProvider - the filter provider used for filtering the "UDT" objects being loaded
distinctTypeFactory - factory for distinct UDTs
structTypeFactory - factory for struct UDTs
javaTypeFactory - factory for Java UDTs
Method Detail

loadUDTs

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

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

loadUDTs

public void loadUDTs(java.util.List containmentList,
                     java.util.Collection existingUDTs)
              throws java.sql.SQLException
Loads the "UDT" objects from the database. This method uses the result set from createResultSet() to load the "UDT" objects from the server. This method first checks the name of the "UDT" 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(). UserDefinedType objects are created and initialized using one of the registered factories. This method should only be overridden as a last resort when the desired behavior cannot be acheived by overriding createResultSet(), closeResultSet(), processRow(), and a specialized Struct, Distinct and Java type factories.

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

clearUDTs

public void clearUDTs(java.util.List existingUDTs)
Removes the specified UDTs from the model.

Parameters:
existingUDTs - the UDTs to be removed from the model.


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