com.sibvisions.rad.persist.jdbc
Class DB2DBAccess
java.lang.Object
com.sibvisions.rad.persist.jdbc.DBAccess
com.sibvisions.rad.persist.jdbc.DB2DBAccess
- All Implemented Interfaces:
- IDBAccess
public class DB2DBAccess
- extends DBAccess
The DB2DBAccess is the implementation for DB2 databases.
- See Also:
DBAccess
|
Constructor Summary |
DB2DBAccess()
Constructs a new DB2DBAccess Object. |
| Methods inherited from class com.sibvisions.rad.persist.jdbc.DBAccess |
close, commit, delete, executeFunction, executeProcedure, executeUpdate, fetch, getAllowedValues, getAutomaticLinkColName, getAutomaticLinkColumnNameTranslation, getColumnMetaData, getConnection, getDatabaseSpecificLockStatement, getDBAccess, getDBProperties, getDBProperty, getDriver, getFKs, getFromClause, getMaxTime, getPassword, getPK, getPreparedStatement, getQueryColumns, getSelectStatement, getUKs, getUrl, getUsername, getWHEREClause, insert, insertAnsiSQL, insertDatabaseSpecific, isOpen, lockRow, lockRowInternal, open, quote, registerDBAccessClass, rollback, setAutomaticLinkColumnNameTranslation, setColumnsToStore, setDBProperties, setDBProperty, setDriver, setFilterParameter, setMaxTime, setPassword, setQueryTimeOut, setUrl, setUsername, supportsGetGeneratedKeys, toString, translateValue, update, updateAnsiSQL, updateDatabaseSpecific |
DB2DBAccess
public DB2DBAccess()
- Constructs a new DB2DBAccess Object.
getDefaultValues
public Hashtable<String,Object> getDefaultValues(String pCatalog,
String pSchema,
String pTable)
throws DataSourceException
- Gets all default column values of a specific table.
- Overrides:
getDefaultValues in class DBAccess
- Parameters:
pCatalog - the catalog namepSchema - the schema namepTable - the table name
- Returns:
- a
Hashtable with the column name as key and the default value as value. It only contains columns
with a default value
- Throws:
DataSourceException - if the database access throws an exception
translateDefaultValue
protected Object translateDefaultValue(String pColumnName,
int pDataType,
String pDefaultValue)
throws Exception
- Translates a default value from a column to the datatype object.
- Overrides:
translateDefaultValue in class DBAccess
- Parameters:
pColumnName - the column name to translatepDataType - the datatype of the columnpDefaultValue - the original default value from the database
- Returns:
- the default value with the datatype of the column or
null if the default value is not valid
- Throws:
Exception - if the type translation causes an error or the datatype is not supported
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.