|
||||||||||
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.HanaDBAccess
public class HanaDBAccess
The HanaDBAccess
is the implementation for SAP HANA 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 | |
---|---|
HanaDBAccess()
Constructs a new HanaDBAccess Object. |
Method Summary | |
---|---|
protected void |
commitOrRollbackBeforeClose()
Calls commit or rollback before closing the connection. |
protected java.lang.String |
getColumnName(java.sql.ResultSetMetaData pMetaData,
int pColumn)
Gets the column name from the given resultset metadata. |
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 TableInfo |
getTableInfoIntern(java.lang.String pWriteBackTable)
Returns the meta data information for the specified query, and configures all columns with defaults. |
protected java.util.List<Key> |
getUniqueKeysIntern(java.lang.String pCatalog,
java.lang.String pSchema,
java.lang.String pTable)
It gets all columns for each Unique Key and return it. |
java.lang.Object[] |
insert(java.lang.String pWriteBackTable,
ServerMetaData pServerMetaData,
java.lang.Object[] pNewDataRow)
Returns the newly inserted row from the write back table. |
java.lang.Object[] |
insertDatabaseSpecific(java.lang.String pWriteBackTable,
java.lang.String pInsertStatement,
ServerMetaData pServerMetaData,
java.lang.Object[] pNewDataRow,
java.lang.String pDummyColumn)
Returns the newly inserted row from a Database specific insert statement. |
protected java.lang.Object[] |
insertHana(java.lang.String pWriteBackTable,
java.lang.String pInsertStatement,
ServerMetaData pServerMetaData,
java.lang.Object[] pNewDataRow,
java.lang.String pDummyColumn)
Returns the newly inserted row from a SAP Hana Database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HanaDBAccess()
Method Detail |
---|
public java.lang.Object[] insert(java.lang.String pWriteBackTable, ServerMetaData pServerMetaData, java.lang.Object[] pNewDataRow) throws DataSourceException
insert
in interface IDBAccess
insert
in class DBAccess
pWriteBackTable
- the write back table to use.pServerMetaData
- the meta data to use.pNewDataRow
- the new values Object[] to insert.
DataSourceException
- if an Exception
occur during insert the row to the tablepublic java.lang.Object[] insertDatabaseSpecific(java.lang.String pWriteBackTable, java.lang.String pInsertStatement, ServerMetaData pServerMetaData, java.lang.Object[] pNewDataRow, java.lang.String pDummyColumn) throws DataSourceException
insertDatabaseSpecific
in class DBAccess
pWriteBackTable
- the table to use for the insertpInsertStatement
- the SQL Statement to use for the insertpServerMetaData
- the meta data to use.pNewDataRow
- the new row (Object[]) with the values to insertpDummyColumn
- null
, if all writeable columns are null, but for a correct INSERT it have
to be minimum one column to use in the syntax.
DataSourceException
- if an Exception
occur during insert to the storageprotected TableInfo getTableInfoIntern(java.lang.String pWriteBackTable) throws DataSourceException
getTableInfoIntern
in class DBAccess
pWriteBackTable
- 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 supportedprotected java.lang.String getColumnName(java.sql.ResultSetMetaData pMetaData, int pColumn) throws java.sql.SQLException
getColumnName
in class DBAccess
pMetaData
- the metadatapColumn
- the column index
java.sql.SQLException
- if accessing metadata failedprotected 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 DBAccess
pCatalog
- 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 exceptionprotected java.util.List<Key> getUniqueKeysIntern(java.lang.String pCatalog, java.lang.String pSchema, java.lang.String pTable) throws DataSourceException
getUniqueKeysIntern
in class DBAccess
pCatalog
- the catalog to usepSchema
- the schema to usepTable
- the table to use
DataSourceException
- if an error occur during UK search process.protected java.util.List<ForeignKey> getForeignKeysIntern(java.lang.String pCatalog, java.lang.String pSchema, java.lang.String pTable) throws DataSourceException
getForeignKeysIntern
in class DBAccess
pCatalog
- 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 void commitOrRollbackBeforeClose()
commitOrRollbackBeforeClose
in class DBAccess
protected java.lang.Object[] insertHana(java.lang.String pWriteBackTable, java.lang.String pInsertStatement, ServerMetaData pServerMetaData, java.lang.Object[] pNewDataRow, java.lang.String pDummyColumn) throws DataSourceException
pWriteBackTable
- the table to use for the insertpInsertStatement
- the SQL Statement to use for the insertpServerMetaData
- the meta data to use.pNewDataRow
- the new row (Object[]) with the values to insertpDummyColumn
- true, if all writeable columns are null, but for a
correct INSERT it have
to be minimum one column to use in the syntax.
DataSourceException
- if an Exception
occur during insert to the
storage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |