|
||||||||||
| 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.H2DBAccess
public class H2DBAccess
The H2DBAccess is the implementation for the H2 database.
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 | |
|---|---|
H2DBAccess()
Creates a new instance of H2DBAccess. |
|
| Method Summary | |
|---|---|
protected String |
getColumnName(ResultSetMetaData pMetaData,
int pColumn)
Gets the column name from the given resultset metadata. |
protected Map<String,Object> |
getDefaultValuesIntern(String pCatalog,
String pSchema,
String pTable)
Gets all default column values of a specific table. |
protected List<ForeignKey> |
getForeignKeysIntern(String pCatalog,
String pSchema,
String pTable)
Returns all Foreign Keys for the specified table. |
protected Object |
translateDefaultValue(String pColumnName,
int pDataType,
String pDefaultValue)
Translates a default value from a column to the datatype object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public H2DBAccess()
H2DBAccess.
| Method Detail |
|---|
protected String getColumnName(ResultSetMetaData pMetaData,
int pColumn)
throws SQLException
getColumnName in class DBAccesspMetaData - the metadatapColumn - the column index
SQLException - if accessing metadata failed
protected Map<String,Object> getDefaultValuesIntern(String pCatalog,
String pSchema,
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 List<ForeignKey> getForeignKeysIntern(String pCatalog,
String pSchema,
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 Object translateDefaultValue(String pColumnName,
int pDataType,
String pDefaultValue)
throws Exception
translateDefaultValue in class DBAccesspColumnName - the column name to translatepDataType - the datatype of the columnpDefaultValue - the original default value from the database
null if the default value is not valid
Exception - if the type translation causes an error or the datatype is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||