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

java.lang.Object
  extended by org.eclipse.datatools.connectivity.sqm.loader.JDBCBaseLoader
      extended by org.eclipse.datatools.connectivity.sqm.loader.JDBCTableIndexLoader
Direct Known Subclasses:
MySqlTableIndexLoader

public class JDBCTableIndexLoader
extends JDBCBaseLoader

Base loader implementation for loading a table's index 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_ASC_OR_DESC
          The column name containing the index's sort order.
static java.lang.String COLUMN_COLUMN_NAME
          The column name containing the index's column's name.
static java.lang.String COLUMN_INDEX_NAME
          The column name containing the index's name.
static java.lang.String COLUMN_INDEX_QUALIFIER
          The column name containing of the index catalog qualifier.
static java.lang.String COLUMN_NON_UNIQUE
          The column name used to define the uniqueness of the columns in the index.
static java.lang.String COLUMN_TYPE
          The column name containing the index's type.
static java.lang.String TYPE_ORDER_ASC
          Ascending index sort type.
static java.lang.String TYPE_ORDER_DESC
          Descending index sort type.
 
Constructor Summary
JDBCTableIndexLoader(ICatalogObject catalogObject)
          This constructs the loader using no filtering.
JDBCTableIndexLoader(ICatalogObject catalogObject, IConnectionFilterProvider connectionFilterProvider)
           
 
Method Summary
 void clearIndexes(java.util.List indexes)
          Removes the specified indexes from the model.
 java.util.List loadIndexes()
          Deprecated. see loadIndexes(List, Collection)
 void loadIndexes(java.util.List containmentList, java.util.Collection existingIndexes)
          Loads the "index" 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_NON_UNIQUE

public static final java.lang.String COLUMN_NON_UNIQUE
The column name used to define the uniqueness of the columns in the index.

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

COLUMN_INDEX_QUALIFIER

public static final java.lang.String COLUMN_INDEX_QUALIFIER
The column name containing of the index catalog qualifier.

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

COLUMN_INDEX_NAME

public static final java.lang.String COLUMN_INDEX_NAME
The column name containing the index's name.

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

COLUMN_TYPE

public static final java.lang.String COLUMN_TYPE
The column name containing the index's type.

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

COLUMN_COLUMN_NAME

public static final java.lang.String COLUMN_COLUMN_NAME
The column name containing the index's column's name.

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

COLUMN_ASC_OR_DESC

public static final java.lang.String COLUMN_ASC_OR_DESC
The column name containing the index's sort order.

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

TYPE_ORDER_ASC

public static final java.lang.String TYPE_ORDER_ASC
Ascending index sort type.

See Also:
Constant Field Values

TYPE_ORDER_DESC

public static final java.lang.String TYPE_ORDER_DESC
Descending index sort type.

See Also:
Constant Field Values
Constructor Detail

JDBCTableIndexLoader

public JDBCTableIndexLoader(ICatalogObject catalogObject)
This constructs the loader using no filtering.

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

JDBCTableIndexLoader

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

loadIndexes

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

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

loadIndexes

public void loadIndexes(java.util.List containmentList,
                        java.util.Collection existingIndexes)
                 throws java.sql.SQLException
Loads the "index" objects from the database. This method uses the result set from createResultSet() to load the "index" objects from the server. Index objects are created using the factory method, createIndex(). This method should only be overridden as a last resort when the desired behavior cannot be acheived by overriding createResultSet(), closeResultSet(), createIndex(), initIndex(), createIndexMember() and initIndexMember().

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

clearIndexes

public void clearIndexes(java.util.List indexes)
Removes the specified indexes from the model.

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