|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.rad.persist.jdbc.DBAccess
com.sibvisions.rad.persist.jdbc.DB2DBAccess
public class DB2DBAccess
The DB2DBAccess is the implementation for DB2 databases.
DBAccess| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sibvisions.rad.persist.jdbc.DBAccess |
|---|
DBAccess.BlobFileHandle, DBAccess.ParameterizedStatement |
| Field Summary |
|---|
| Fields inherited from class com.sibvisions.rad.persist.jdbc.DBAccess |
|---|
BFILE, LONGNVARCHAR, NCHAR, NCLOB, NVARCHAR, QUOTE, SQLXML, TIMESTAMPWITHLOCALTIMEZONE, TIMESTAMPWITHTIMEZONE |
| Constructor Summary | |
|---|---|
DB2DBAccess()
Constructs a new DB2DBAccess Object. |
|
| Method Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getDefaultValuesIntern(java.lang.String pCatalog,
java.lang.String pSchema,
java.lang.String pTable)
Gets all default column values of a specific table. |
protected java.util.List<ForeignKey> |
getForeignKeysIntern(java.lang.String pCatalog,
java.lang.String pSchema,
java.lang.String pTable)
Returns all Foreign Keys for the specified table. |
protected java.lang.String |
getTableForSynonymIntern(java.lang.String pSynomyn)
Returns the full qualified table name incl. schema/catalog/db link for the given synonym. |
protected TableInfo |
getTableInfoIntern(java.lang.String pWriteBackTable)
Returns the meta data information for the specified query, and configures all columns with defaults. |
protected void |
initializeDataType(java.sql.ResultSetMetaData pResultSetMetaData,
int pResultSetColumnIndex,
ColumnMetaData pColumnMetaData)
Initializes the datatype data of the ColumnMetaData with the given ResultSetMetaData. |
void |
open()
It opens the database and stores the Connection object. |
void |
setUsername(java.lang.String pUsername)
Sets the user name to connect with. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DB2DBAccess()
| Method Detail |
|---|
public void open()
throws DataSourceException
Connection object.
open in class DBAccessDataSourceException - if the database couldn't openedpublic void setUsername(java.lang.String pUsername)
DBAccess
setUsername in class DBAccesspUsername - the user name
protected java.util.Map<java.lang.String,java.lang.Object> getDefaultValuesIntern(java.lang.String pCatalog,
java.lang.String pSchema,
java.lang.String pTable)
throws DataSourceException
getDefaultValuesIntern in class DBAccesspCatalog - the catalog namepSchema - the schema namepTable - the table name
Hashtable with the column name as key and the default value as value. It only contains columns
with a default value
DataSourceException - if the database access throws an exception
protected TableInfo getTableInfoIntern(java.lang.String pWriteBackTable)
throws DataSourceException
getTableInfoIntern in class DBAccesspWriteBackTable - the write back table to use for the isWriteable() state (Optional)
DataSourceException - if an Exception occur during getting the meta data or
if the storage is not opened or
if one columns SQL type is not supported
protected java.util.List<ForeignKey> getForeignKeysIntern(java.lang.String pCatalog,
java.lang.String pSchema,
java.lang.String pTable)
throws DataSourceException
getForeignKeysIntern in class DBAccesspCatalog - the catalog to usepSchema - the schema to usepTable - the table to use as base table.
DataSourceException - if an error occur in determining the ForeignKeys.
protected java.lang.String getTableForSynonymIntern(java.lang.String pSynomyn)
throws DataSourceException
getTableForSynonymIntern in class DBAccesspSynomyn - the synonym to use.
DataSourceException - if an error occur in determining the synonyms.
protected void initializeDataType(java.sql.ResultSetMetaData pResultSetMetaData,
int pResultSetColumnIndex,
ColumnMetaData pColumnMetaData)
throws java.sql.SQLException,
DataSourceException
ColumnMetaData with the given ResultSetMetaData.
initializeDataType in class DBAccesspResultSetMetaData - the result set meta data.pResultSetColumnIndex - the column index.pColumnMetaData - the ColumnMetaData
java.sql.SQLException - if an unwanted SQLException occurs
DataSourceException - if an know problem occurs during creation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||