Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.server.DataServices.DatabaseProvider
Interface DatabaseProviderInterface

All Known Implementing Classes:
DatabaseProvider

public interface DatabaseProviderInterface

Field Summary
static int DBTYPE_DB2
           
static int DBTYPE_MSSQLSERVER
           
static int DBTYPE_MYSQL
           
static int DBTYPE_ORACLE
           
static int DBTYPE_SIEBEL_ANALYTICS
           
static int DBTYPE_UNKNOWN
           

 

Method Summary
 java.sql.Connection getConnection()
           
 int getDatabaseType()
           
 SDDataSourceInterface getDataSource()
           
 DeadlockHandler getDeadlockHandler()
          Returns a new deadlock handler object.
 ManualFlushTableInserter getManualFlushTableInserter(java.lang.String table, java.lang.String[] columns, int bufferSize, boolean autoGrowBuffer)
          Returns a manually-flushed batched TableInserter that can be used for inserting data into a database table.
 DatabaseProviderMetaData getMetaData()
           
 StoredProcedure getStoredProcedure(java.lang.String storedProcedureName, int paramCount)
          Returns a StoredProcedure object that is used to call stored procedures in a database.
 StoredProcCacheEntry getStoredProcInfo(java.lang.String procName, boolean refresh)
           
 TableCacheEntry getTableCacheEntry(java.lang.String tableName, boolean refresh)
          get the cache entry for the specified table
 TableDeleter getTableDeleter(java.lang.String table)
          Returns a TableDeleter that can be used for deleting rows in a database table.
 TableDeleter getTableDeleter(java.lang.String table, int batchSize, int maxQueueLength)
          Returns a TableDeleter that can be used for deleting rows in a database table.
 TableDeleter getTableDeleter(java.lang.String table, java.lang.String[] whereColumns)
          Returns a TableDeleter that can be used for deleting rows from a database table, one at a time.
 TableDeleter getTableDeleter(java.lang.String table, java.lang.String[] whereColumns, int whereType, int batchSize, int maxQueueLength)
          Returns a TableDeleter that can be used for deleting rows in a database table.
 TableDeleter getTableDeleter(java.lang.String table, java.lang.String[] whereColumns, java.lang.String where, int batchSize, int maxQueueLength)
          Returns a TableDeleter that can be used for deleting rows in a database table.
 TableCacheEntry getTableInfo(java.lang.String tableName)
           
 TableInserter getTableInserter(java.lang.String table, java.lang.String... columns)
          Returns an un-batched TableInserter that can be used for inserting data into database tables, one row at a time.
 TableInserter getTableInserter(java.lang.String table, java.lang.String[] columns, int batchSize, int maxQueueLength)
          Returns an auto-flush batched TableInserter that can be used for inserting data into a database table.
 TableReader getTableReader(java.lang.String table, java.lang.String[] columns)
          Returns a TableReader that can be used for reading a database table.
 TableReader getTableReader(java.lang.String table, java.lang.String[] columns, java.lang.String[] whereColumns)
          Returns a TableReader that can be used for reading a database table.
 TableReader getTableReader(java.lang.String table, java.lang.String[] columns, java.lang.String[] whereColumns, int whereType)
          Returns a TableReader that can be used for reading a database table.
 TableReader getTableReader(java.lang.String table, java.lang.String[] columns, java.lang.String[] whereColumns, java.lang.String where)
          Returns a TableReader that can be used for reading a database table.
 TableUpdater getTableUpdater(java.lang.String table, java.lang.String[] columns)
          Returns a TableUpdater that can be used for updating data in a database table.
 TableUpdater getTableUpdater(java.lang.String table, java.lang.String[] columns, int batchSize, int maxQueueLength)
          Returns a TableUpdater that can be used for updating data in a database table.
 TableUpdater getTableUpdater(java.lang.String table, java.lang.String[] columns, java.lang.String[] whereColumns, int whereType, int batchSize, int maxQueueLength)
          Returns a TableUpdater that can be used for updating data in a database table.
 TableUpdater getTableUpdater(java.lang.String table, java.lang.String[] columns, java.lang.String[] whereColumns, java.lang.String where, int batchSize, int maxQueueLength)
          Returns a TableUpdater that can be used for updating data in a database table.
 WriteOnlyStoredProcedure getWriteOnlyStoredProcedure(java.lang.String storedProcedureName, int paramCount, int batchSize, int maxQueueLength)
          Returns a WriteOnlyStoredProcedure that can be used to call a stored procedure that updates data in a database but does not return any data.
 boolean isCaseSensitive()
          Indicates whether the datasource associated with the DataProvider is case sensitive.
 void removeProcedureCacheEntry(java.lang.String procName)
           
 boolean supportsBatchUpdates()
           

 

Field Detail

DBTYPE_MSSQLSERVER

static final int DBTYPE_MSSQLSERVER
See Also:
Constant Field Values

DBTYPE_ORACLE

static final int DBTYPE_ORACLE
See Also:
Constant Field Values

DBTYPE_DB2

static final int DBTYPE_DB2
See Also:
Constant Field Values

DBTYPE_MYSQL

static final int DBTYPE_MYSQL
See Also:
Constant Field Values

DBTYPE_SIEBEL_ANALYTICS

static final int DBTYPE_SIEBEL_ANALYTICS
See Also:
Constant Field Values

DBTYPE_UNKNOWN

static final int DBTYPE_UNKNOWN
See Also:
Constant Field Values

Method Detail

supportsBatchUpdates

boolean supportsBatchUpdates()

getConnection

java.sql.Connection getConnection()
Returns:
Connection, never returns null

getTableReader

TableReader getTableReader(java.lang.String table,
                           java.lang.String[] columns)
Returns a TableReader that can be used for reading a database table.

The columns specified by columns are returned. All rows of the table are returned.

Parameters:
table - the table to read
columns - the names of the columns to select (the projection). If null, then all columns are selected.
Returns:
the TableReader

getTableReader

TableReader getTableReader(java.lang.String table,
                           java.lang.String[] columns,
                           java.lang.String[] whereColumns,
                           int whereType)
Returns a TableReader that can be used for reading a database table.

The columns specified by columns are returned. The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table to read
columns - the names of the columns to select. A null specifies all columns.
whereColumns - the names of the columns used to select rows (see the Where interface)
whereType - used to specify whether Where terms are intersection or union (see the Where interface)
Returns:
the TableReader
See Also:
Where

getTableReader

TableReader getTableReader(java.lang.String table,
                           java.lang.String[] columns,
                           java.lang.String[] whereColumns)
Returns a TableReader that can be used for reading a database table.

The columns specified by columns are returned. The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table to read
columns - the names of the columns to select. A null specifies all columns.
whereColumns - the names of the columns used to select rows. The conditions are combined using AND operators.
Returns:
the TableReader
See Also:
Where

getTableReader

TableReader getTableReader(java.lang.String table,
                           java.lang.String[] columns,
                           java.lang.String[] whereColumns,
                           java.lang.String where)
Returns a TableReader that can be used for reading a database table.

The columns specified by columns are returned. The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table to read
columns - the names of the columns to select. A null specifies all columns.
whereColumns - the names of the columns used to select rows (see the Where interface)
where - a string used in constructing a WHERE clause (see the Where interface)
Returns:
the TableReader

getTableInserter

TableInserter getTableInserter(java.lang.String table,
                               java.lang.String... columns)
Returns an un-batched TableInserter that can be used for inserting data into database tables, one row at a time.

The columns into which data will be inserted are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table to insert data into
columns - the names of the columns to insert data into
Returns:
the TableInserter

getTableInserter

TableInserter getTableInserter(java.lang.String table,
                               java.lang.String[] columns,
                               int batchSize,
                               int maxQueueLength)
Returns an auto-flush batched TableInserter that can be used for inserting data into a database table.

The columns into which data will be inserted are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table to insert data into
columns - the names of the columns to insert data into
batchSize - the number of insert operations to batch together before submitting them to the database
Returns:
the TableInserter

getManualFlushTableInserter

ManualFlushTableInserter getManualFlushTableInserter(java.lang.String table,
                                                     java.lang.String[] columns,
                                                     int bufferSize,
                                                     boolean autoGrowBuffer)
Returns a manually-flushed batched TableInserter that can be used for inserting data into a database table.

The columns into which data will be inserted are specified by columns. Batch operation is enabled if the bufferSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table to insert data into
columns - the names of the columns to insert data into
bufferSize - the initial buffer will be large enough to hold this number of insert operations.
autoGrowBuffer - true if the buffer should automatically grow when an attempt is made to insert too many rows. If false, an SDRunTimeException will be thrown.
Returns:
the TableInserter

getTableUpdater

TableUpdater getTableUpdater(java.lang.String table,
                             java.lang.String[] columns)
Returns a TableUpdater that can be used for updating data in a database table.

The columns that are to be updated are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table which is to be updated
columns - the names of the columns which are to be updated
Returns:
the TableUpdater

getTableUpdater

TableUpdater getTableUpdater(java.lang.String table,
                             java.lang.String[] columns,
                             int batchSize,
                             int maxQueueLength)
Returns a TableUpdater that can be used for updating data in a database table.

The columns that are to be updated are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table which is to be updated
columns - the names of the columns which are to be updated
batchSize - the number of update operations to batch together before submitting them to the database
Returns:
the TableUpdater

getTableUpdater

TableUpdater getTableUpdater(java.lang.String table,
                             java.lang.String[] columns,
                             java.lang.String[] whereColumns,
                             int whereType,
                             int batchSize,
                             int maxQueueLength)
Returns a TableUpdater that can be used for updating data in a database table.

The columns that are to be updated are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations. The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table which is to be updated
columns - the names of the columns which are to be updated
whereColumns - the names of the columns used to select rows (see the Where interface)
whereType - used to specify whether Where terms are intersection or union (see the Where interface)
batchSize - the number of update operations to batch together before submitting to the database
Returns:
the TableUpdater

getTableUpdater

TableUpdater getTableUpdater(java.lang.String table,
                             java.lang.String[] columns,
                             java.lang.String[] whereColumns,
                             java.lang.String where,
                             int batchSize,
                             int maxQueueLength)
Returns a TableUpdater that can be used for updating data in a database table.

The columns that are to be updated are specified by columns. Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations. The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table which is to be updated
columns - the names of the columns which are to be updated
whereColumns - the names of the columns used to select rows (see the Where interface)
where - a string used in constructing a WHERE clause (see the Where interface)
batchSize - the number of update operations to batch together before submitting to the database
Returns:
the TableUpdater

getTableDeleter

TableDeleter getTableDeleter(java.lang.String table)
Returns a TableDeleter that can be used for deleting rows in a database table.

Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table from which rows will be deleted
Returns:
the TableDeleter

getTableDeleter

TableDeleter getTableDeleter(java.lang.String table,
                             int batchSize,
                             int maxQueueLength)
Returns a TableDeleter that can be used for deleting rows in a database table.

Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table from which rows will be deleted
batchSize - the number of delete operations to batch together before submitting them to the database
Returns:
the TableDeleter

getTableDeleter

TableDeleter getTableDeleter(java.lang.String table,
                             java.lang.String[] whereColumns,
                             int whereType,
                             int batchSize,
                             int maxQueueLength)
Returns a TableDeleter that can be used for deleting rows in a database table.

Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
table - the name of the table from which rows will be deleted
whereColumns - the names of the columns used to select rows (see the Where interface)
whereType - used to specify whether Where terms are intersection or union (see the Where interface)
batchSize - the number of delete operations to batch together before submitting them to the database
Returns:
the TableDeleter

getTableDeleter

TableDeleter getTableDeleter(java.lang.String table,
                             java.lang.String[] whereColumns)
Returns a TableDeleter that can be used for deleting rows from a database table, one at a time.

Batch operation is disabled.

Parameters:
table - the name of the table from which rows will be deleted
whereColumns - the names of the columns used to select rows. The conditions are combined using AND operators.
Returns:
the TableDeleter
See Also:
Where

getTableDeleter

TableDeleter getTableDeleter(java.lang.String table,
                             java.lang.String[] whereColumns,
                             java.lang.String where,
                             int batchSize,
                             int maxQueueLength)
Returns a TableDeleter that can be used for deleting rows in a database table.

Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

The selection of the rows is governed by the 'where' parameters.

Parameters:
table - the name of the table from which rows will be deleted
whereColumns - the names of the columns used to select rows (see the Where interface)
where - a string used in constructing a WHERE clause (see the Where interface)
batchSize - the number of delete operations to batch together before submitting them to the database
Returns:
the TableDeleter

getStoredProcedure

StoredProcedure getStoredProcedure(java.lang.String storedProcedureName,
                                   int paramCount)
Returns a StoredProcedure object that is used to call stored procedures in a database.

Don't forget to call WriteOnlyStoredProcedure.close()

Parameters:
storedProcedureName - the name of the stored procedure
paramCount - a parameter that is either the number of parameters to use or StoredProcedure.ALL_PARAMETERS. The latter means that it will automatically discover the number of parameters.
Returns:
the StoredProcedure object

getWriteOnlyStoredProcedure

WriteOnlyStoredProcedure getWriteOnlyStoredProcedure(java.lang.String storedProcedureName,
                                                     int paramCount,
                                                     int batchSize,
                                                     int maxQueueLength)
Returns a WriteOnlyStoredProcedure that can be used to call a stored procedure that updates data in a database but does not return any data.

Batch operation is enabled if the batchSize parameter is greater than one and the database supports batch operations.

Parameters:
storedProcedureName - the name of the stored procedure
paramCount - a parameter that is either the number of parameters to use or StoredProcedure.ALL_PARAMETERS. The latter means that it will automatically discover the number of parameters.
batchSize - the number of stored procedure calls to batch together before submitting them to the database
Returns:
the StoredProcedure object

getMetaData

DatabaseProviderMetaData getMetaData()

isCaseSensitive

boolean isCaseSensitive()
Indicates whether the datasource associated with the DataProvider is case sensitive. This case sensitivity is for unqualified database identifiers
Returns:
true if the datasource associated with the DataProvider is case sensitive.

getDatabaseType

int getDatabaseType()

getTableCacheEntry

TableCacheEntry getTableCacheEntry(java.lang.String tableName,
                                   boolean refresh)
get the cache entry for the specified table

This method was necessitated by the need to get columns info to support Oracle I18n data.

Parameters:
tableName -

getDataSource

SDDataSourceInterface getDataSource()

getStoredProcInfo

StoredProcCacheEntry getStoredProcInfo(java.lang.String procName,
                                       boolean refresh)

getTableInfo

TableCacheEntry getTableInfo(java.lang.String tableName)

removeProcedureCacheEntry

void removeProcedureCacheEntry(java.lang.String procName)

getDeadlockHandler

DeadlockHandler getDeadlockHandler()
Returns a new deadlock handler object.

Although a new object is created on each call, this method is only called when exceptions occur. If we determine that this is still too expensive, then we can implement a pool.

A single deadlock handler object is no longer sufficient (as it once was) because various database operations that can produce deadlock may be occurring concurrently and it is common to have state in a deadlock handler, e.g. a count of the number of tries.

Returns:
the deadlock handler object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.