com.businessobjects.connectionserver.datasources.ddk.opendriver
Interface OpenDriver

All Superinterfaces:
DBDriver

public interface OpenDriver
extends DBDriver

This interface defines methods for meta data handling (tables, columns, etc...). All custom drivers must implement this interface. For more information on the usage of this interface, refer to the custom driver sample code.

Author:
Business Objects

Method Summary
 void fetch(int requestedSize, ColumnSet columnSet)
          Fetch at most requestedSize number of columns in the columnSet.
 void fetch(int requestedSize, OwnerSet ownerSet)
          If the driver supports Owners, fetches at most requestedSize number of owners.
 void fetch(int requestedSize, QualifierSet qualifierSet)
          If the driver supports Qualifiers, fetches at most the requestedSize number of qualifiers.
 void fetch(int requestedSize, TableSet tableSet)
          Fetches at most requestedSize number of tables in the tableSet.
 boolean foreignKeysAvailable()
          Returns True: the driver supports foreign keys.
 void getColumns(java.lang.String qualifier, java.lang.String owner, java.lang.String tableName)
          Gets all the columns for a give table, qualifier and owner.
 java.lang.String getCurrentOwner()
          Retrieves the current user name as known to this datasource.
 java.lang.String getCurrentQualifier()
          Retrieves the current qualifier names available in this datasource.
 void getForeignKeys(java.lang.String qualifier, java.lang.String owner, java.lang.String tableName)
          Gets the foreign keys associated with a give table based on tableName, owner and qualifer.
 short getMaxColumnNameLength(short defaultValue)
          Returns the maximum size for column's name.
 short getMaxOwnerNameLength(short defaultValue)
          Returns the maximum size for the owner's name.
 short getMaxQualifierNameLength(short defaultValue)
          Returns the maximum size for the qualifier's name.
 short getMaxTableNameLength(short defaultValue)
          Returns the maximum size for table's name.
 void getOwners(java.lang.String qualifier)
          Retrieves the owners for a given qualifier(catalog)
 void getPrimaryKey(java.lang.String qualifier, java.lang.String owner, java.lang.String tableName)
          Gets the primary key for a table, based on tableName, owner and qualifer.
 void getQualifiers()
          Gets all the qualifiers(catalogs) available.
 void getReferentialDependencies(java.lang.String qualifier, java.lang.String owner, java.lang.String tableName)
          Gets the foreign key columns that reference the given table's primary key columns.
 void getTables(java.lang.String qualifier, java.lang.String owner, java.lang.String pattern, java.util.Collection types)
          Fetches all the tables for a given owner, qualifier and pattern.
 boolean ownersAvailable()
          Returns True: the driver support owners.
 boolean primaryKeyAvailable()
          Returns True: the driver supports primary key.
 boolean qualifiersAvailable()
          Returns True if the driver supports qualifiers (catalog).
 
Methods inherited from interface com.businessobjects.connectionserver.datasources.ddk.DBDriver
abort, arrayBindSupported, arrayFetchSupported, bindColumns, close, commit, connect, connectionProfile, disconnect, execute, fetch, freeResources, getColumnCount, getColumnDescriptions, getUpdateCount, maxRowsSupported, nextResults, ping, prepare, prepare, queryTimeOutSupported, rollback, setArrayBindSize, setArrayFetchSize, setMaxRows, setQueryTimeOut
 

Method Detail

getCurrentQualifier

java.lang.String getCurrentQualifier()
                                     throws CSException

Retrieves the current qualifier names available in this datasource.

Returns:
A qualifier's name.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getCurrentOwner

java.lang.String getCurrentOwner()
                                 throws CSException

Retrieves the current user name as known to this datasource.

Returns:
The datasource user name.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

qualifiersAvailable

boolean qualifiersAvailable()
                            throws CSException

Returns True if the driver supports qualifiers (catalog).

Returns:
  • True: the driver supports qualifiers.
  • False: the driver does not support qualifiers.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

ownersAvailable

boolean ownersAvailable()
                        throws CSException

Returns True: the driver support owners.

Returns:
  • True: the driver supports owners.
  • False: the driver does not support owners.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

primaryKeyAvailable

boolean primaryKeyAvailable()
                            throws CSException

Returns True: the driver supports primary key.

Returns:
  • True: the driver supports primary key.
  • False: the driver does not support primary key.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

foreignKeysAvailable

boolean foreignKeysAvailable()
                             throws CSException

Returns True: the driver supports foreign keys.

Returns:
  • True: the driver supports foreign keys.
  • False: the driver does not support foreign keys.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getMaxQualifierNameLength

short getMaxQualifierNameLength(short defaultValue)

Returns the maximum size for the qualifier's name.

Parameters:
defaultValue - A default value for the size.
Returns:
Either the maximum size name, or the default value.

getMaxOwnerNameLength

short getMaxOwnerNameLength(short defaultValue)

Returns the maximum size for the owner's name.

Parameters:
defaultValue - A default value for the size.
Returns:
Either the maximum size name, or the default value.

getMaxTableNameLength

short getMaxTableNameLength(short defaultValue)

Returns the maximum size for table's name.

Parameters:
defaultValue - A default value for the size
Returns:
Either the maximum size for table's name, or the default value.

getMaxColumnNameLength

short getMaxColumnNameLength(short defaultValue)

Returns the maximum size for column's name.

Parameters:
defaultValue - A default value for the size
Returns:
Either the maximum size for column's name or the default value.

getQualifiers

void getQualifiers()
                   throws CSException

Gets all the qualifiers(catalogs) available.

Throws:
CSException - The feature is not implemented or a datasource access error occurs.

fetch

void fetch(int requestedSize,
           QualifierSet qualifierSet)
           throws CSException

If the driver supports Qualifiers, fetches at most the requestedSize number of qualifiers.

Parameters:
requestedSize - The maximum number of qualifiers to fetch in the qualifierSet.
qualifierSet - The QualifierSet to populate with qualifiers values.
Throws:
CSException - The feature is not implemented or a datasource access error occurs

getOwners

void getOwners(java.lang.String qualifier)
               throws CSException

Retrieves the owners for a given qualifier(catalog)

Parameters:
qualifier - The qualifier (catalog) for which to retrieve the owners.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

fetch

void fetch(int requestedSize,
           OwnerSet ownerSet)
           throws CSException

If the driver supports Owners, fetches at most requestedSize number of owners.

Parameters:
requestedSize - The maximun number of owner to fetch in the OwnerSet.
ownerSet - The OwnerSet to populate with owners values.
Throws:
CSException - If the feature is not implemented or a datasource access error occurs.

getTables

void getTables(java.lang.String qualifier,
               java.lang.String owner,
               java.lang.String pattern,
               java.util.Collection types)
               throws CSException

Fetches all the tables for a given owner, qualifier and pattern.

Parameters:
qualifier - The qualifier(catalog) name
owner - The owner name
pattern - A table name pattern
types - A list of table types, which could be from this list of table types:
  • "TABLE"
  • "VIEW"
  • "SYSTEM TABLE"
  • "GLOBAL TEMPORARY"
  • "LOCAL TEMPORARY"
  • "ALIAS"
  • "SYNONYM"
If type is null, returns all types.
Throws:
CSException - If the feature is not implemented or if a datasource access error occurs

fetch

void fetch(int requestedSize,
           TableSet tableSet)
           throws CSException

Fetches at most requestedSize number of tables in the tableSet.

This method is called after a call to getTables(String, String, String, Collection), to populate the tableSet.

Parameters:
requestedSize - The maximun number of table meta informations to fetch in the TableSet
tableSet - The TableSet to populate with owners values
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getColumns

void getColumns(java.lang.String qualifier,
                java.lang.String owner,
                java.lang.String tableName)
                throws CSException

Gets all the columns for a give table, qualifier and owner.

Parameters:
qualifier - The qualifier of the table.
owner - The owner of the table.
tableName - The name of the table .
Throws:
CSException - The feature is not implemented or a datasource access error occurs

fetch

void fetch(int requestedSize,
           ColumnSet columnSet)
           throws CSException

Fetch at most requestedSize number of columns in the columnSet. This method is called after a call to getColumns(String, String, String) to populate the columnSet.

Parameters:
requestedSize - The maximum number of columns meta-informations to fetch in the ColumnSet.
columnSet - The ColumnSet to populate with column's meta information.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getPrimaryKey

void getPrimaryKey(java.lang.String qualifier,
                   java.lang.String owner,
                   java.lang.String tableName)
                   throws CSException

Gets the primary key for a table, based on tableName, owner and qualifer.

Parameters:
qualifier - The qualifier name of the table
owner - The owner name of the table
tableName - The name of the table
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getForeignKeys

void getForeignKeys(java.lang.String qualifier,
                    java.lang.String owner,
                    java.lang.String tableName)
                    throws CSException

Gets the foreign keys associated with a give table based on tableName, owner and qualifer.

Parameters:
qualifier - The qualifier of the table
owner - The owner of the table
tableName - The name of the table
Throws:
CSException - The feature is not implemented or a datasource access error occurs.

getReferentialDependencies

void getReferentialDependencies(java.lang.String qualifier,
                                java.lang.String owner,
                                java.lang.String tableName)
                                throws CSException

Gets the foreign key columns that reference the given table's primary key columns.

Parameters:
qualifier - The qualifier name of the table.
owner - The owner name of the table.
tableName - The name of the table.
Throws:
CSException - The feature is not implemented or a datasource access error occurs.