## org.eclipse.datatools.connectivity.oda
Interface IDataSetMetaData

public interface IDataSetMetaData

Provides comprehensive information on the driver’s capabilities for a type of data set query.

An ODA runtime driver can implement a connection to work with one or more types of data sets. Different types of data sets often support different features, and/or implement features in different ways. In addition, a driver may implement a feature on top of what the underlying data provider offers.
Information returned by methods in this interface applies to the capabilities of a particular driver and a particular type of data set working together. Note that as used in this documentation, the term "data set" is used generically to refer to both the ODA runtime driver and underlying data provider.

A method that gets information about a feature not supported by the driver will throw an OdaException. This includes methods that return an IResultSet object.

Some methods may be called before the associated connection is opened, while other may require the associated connection to be opened. For example:

`// connection is not opened
IDataSetMetaData metadata = connection.getMetaData( ... );
metadata.supportsInParameters();
connection.open();
metadata.getDataSourceObjects( ... ); // requires an opened connection
`

Field Summary
`static int` `sortModeColumnOrder` The constant indicating that each sorted column can have a different sort order.
`static int` `sortModeNone` The constant indicating that dynamic sorting is not supported.
`static int` `sortModeSingleColumn` The constant indicating that only one single column can be sorted.
`static int` `sortModeSingleOrder` The constant indicating that all sorted columns must be in the same sort order.
`static int` `sqlStateSQL99` The constant indicating that `OdaException.getSQLState` will return a SQL99 SQLSTATE value.
`static int` `sqlStateXOpen` The constant indicating that `OdaException.getSQLState` will return a X/Open SQL CLI SQLSTATE value.

Method Summary
`IConnection` `getConnection()` Returns the connection that produced this metadata object.
`int` `getDataSourceMajorVersion()` Returns the major version number of the underlying data provider.
`int` `getDataSourceMinorVersion()` Returns the minor version number of the underlying data provider.
`IResultSet` `getDataSourceObjects(java.lang.String catalog, java.lang.String schema, java.lang.String object, java.lang.String version)` Returns the collection of objects found in a data provider's catalog.
`java.lang.String` `getDataSourceProductName()` Returns the name of this data provider product.
`java.lang.String` `getDataSourceProductVersion()` Returns the version of this data provider product as a `String`.
`int` `getSortMode()` Returns the dynamic sorting mode supported by this data set type.
`int` `getSQLStateType()` Indicates whether the SQLSTATE returned by `OdaException.getSQLState()` is X/Open SQL CLI or SQL99.
`boolean` `supportsInParameters()` Indicates whether this data set type supports input parameters in `IQuery`.
`boolean` `supportsMultipleOpenResults()` Indicates whether this data set type supports getting multiple `IResultSet` objects simultaneously, in its `IAdvancedQuery` implementation.
`boolean` `supportsMultipleResultSets()` Indicates whether this data set type supports getting multiple `IResultSet` objects (sequentially or simultaneously), in its `IAdvancedQuery` implementation.
`boolean` `supportsNamedParameters()` Indicates whether this data set type supports named parameters in `IQuery`.
`boolean` `supportsNamedResultSets()` Indicates whether this data set type supports getting one or more `IResultSet` objects by name, in its `IAdvancedQuery` implementation.
`boolean` `supportsOutParameters()` Indicates whether this data set type supports output parameters in its `IAdvancedQuery` implementation.

Field Detail

### sqlStateXOpen

    public static final int sqlStateXOpen

  The constant indicating that `OdaException.getSQLState` will return a X/Open SQL CLI SQLSTATE value.

  See Also:
    Constant Field Values

### sqlStateSQL99

    public static final int sqlStateSQL99

  The constant indicating that `OdaException.getSQLState` will return a SQL99 SQLSTATE value.

  See Also:
    Constant Field Values

### sortModeNone

    public static final int sortModeNone

  The constant indicating that dynamic sorting is not supported.

  See Also:
    Constant Field Values

### sortModeSingleOrder

    public static final int sortModeSingleOrder

  The constant indicating that all sorted columns must be in the same sort order.

  See Also:
    Constant Field Values

### sortModeColumnOrder

    public static final int sortModeColumnOrder

  The constant indicating that each sorted column can have a different sort order.

  See Also:
    Constant Field Values

### sortModeSingleColumn

    public static final int sortModeSingleColumn

  The constant indicating that only one single column can be sorted.

  See Also:
    Constant Field Values

Method Detail

### getConnection

    public IConnection getConnection()
                              throws OdaException

  Returns the connection that produced this metadata object.

  Returns:
    the connection that produced this metadata object.
  Throws:
    `OdaException` - if data source error occurs.

### getDataSourceObjects

    public IResultSet getDataSourceObjects(java.lang.String catalog,
                                           java.lang.String schema,
                                           java.lang.String object,
                                           java.lang.String version)
                                    throws OdaException

  Returns the collection of objects found in a data provider's catalog. Valid arguments to this method are implementation-dependent.
  An optional method.

  Parameters:
    `catalog` - data provider's catalog.
    `schema` - search pattern for the data provider's schema or owner name; could be left empty if not applicable to the connected data provider.
    `object` - search pattern for the data provider's object name.
    `version` - data provider's objects version.
  Returns:
    an IResultSet object describing the data provider's objects.
  Throws:
    `OdaException` - if data source error occurs.

### getDataSourceMajorVersion

    public int getDataSourceMajorVersion()
                                  throws OdaException

  Returns the major version number of the underlying data provider.

  Returns:
    the major version number.
  Throws:
    `OdaException` - if data source error occurs.

### getDataSourceMinorVersion

    public int getDataSourceMinorVersion()
                                  throws OdaException

  Returns the minor version number of the underlying data provider.

  Returns:
    the minor version number.
  Throws:
    `OdaException` - if data source error occurs.

### getDataSourceProductName

    public java.lang.String getDataSourceProductName()
                                              throws OdaException

  Returns the name of this data provider product.

  Returns:
    data provider product name.
  Throws:
    `OdaException` - if data source error occurs.

### getDataSourceProductVersion

    public java.lang.String getDataSourceProductVersion()
                                                 throws OdaException

  Returns the version of this data provider product as a `String`.

  Returns:
    data provider product version.
  Throws:
    `OdaException` - if data source error occurs.

### getSQLStateType

    public int getSQLStateType()
                        throws OdaException

  Indicates whether the SQLSTATE returned by `OdaException.getSQLState()` is X/Open SQL CLI or SQL99.
  An optional method.

  Returns:
    the type of SQLSTATE;
    one of sqlStateXOpen,
    sqlStateSQL99.
  Throws:
    `OdaException` - if data source error occurs.

### supportsMultipleResultSets

    public boolean supportsMultipleResultSets()
                                       throws OdaException

  Indicates whether this data set type supports getting multiple `IResultSet` objects (sequentially or simultaneously), in its `IAdvancedQuery` implementation.

  Returns:
    true if this data set supports getting multiple `IResultSet` objects; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### supportsMultipleOpenResults

    public boolean supportsMultipleOpenResults()
                                        throws OdaException

  Indicates whether this data set type supports getting multiple `IResultSet` objects simultaneously, in its `IAdvancedQuery` implementation.

  Returns:
    true if this data set supports getting multiple `IResultSet` objects simultaneously; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### supportsNamedResultSets

    public boolean supportsNamedResultSets()
                                    throws OdaException

  Indicates whether this data set type supports getting one or more `IResultSet` objects by name, in its `IAdvancedQuery` implementation.

  Returns:
    true if this data set supports getting one or more `IResultSet` objects by name; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### supportsNamedParameters

    public boolean supportsNamedParameters()
                                    throws OdaException

  Indicates whether this data set type supports named parameters in `IQuery`.

  Returns:
    true if named parameters are supported; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### supportsInParameters

    public boolean supportsInParameters()
                                 throws OdaException

  Indicates whether this data set type supports input parameters in `IQuery`.

  Returns:
    true if input parameters are supported; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### supportsOutParameters

    public boolean supportsOutParameters()
                                  throws OdaException

  Indicates whether this data set type supports output parameters in its `IAdvancedQuery` implementation.

  Returns:
    true if output parameters are supported; false otherwise.
  Throws:
    `OdaException` - if data source error occurs.

### getSortMode

    public int getSortMode()

  Returns the dynamic sorting mode supported by this data set type.

  Returns:
    the dynamic sorting mode supported by the data source; one of `sortModeNone`, `sortModeSingleOrder`, `sortModeColumnOrder`, `sortModeSingleColumn`

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