|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ojb.broker.accesslayer.JdbcAccess
JdbcAccess is responsible for establishing performing SQL Queries against remote Databases. It hides all knowledge about JDBC from the BrokerImpl
Constructor Summary | |
JdbcAccess(PersistenceBrokerImpl broker)
constructor is private, use getInstance to get the singleton instance of this class |
Method Summary | |
int |
executeCount(Query query,
ClassDescriptor mif)
performs a SELECT COUNT(*) operation against RDBMS. |
void |
executeDelete(ClassDescriptor mif,
java.lang.Object obj)
performs a DELETE operation against RDBMS. |
void |
executeInsert(ClassDescriptor mif,
java.lang.Object obj)
performs an INSERT operation against RDBMS. |
(package private) java.sql.ResultSet |
executeQuery(Query query,
ClassDescriptor mif)
performs a SELECT operation against RDBMS. |
(package private) java.sql.ResultSet |
executeSQL(java.lang.String sqlStatement,
ClassDescriptor cld)
performs a SQL SELECT statement against RDBMS. |
void |
executeUpdate(ClassDescriptor mif,
java.lang.Object obj)
performs an UPDATE operation against RDBMS. |
int |
executeUpdateSQL(java.lang.String sqlStatement,
ClassDescriptor cld)
performs a SQL UPDTE, INSERT or DELETE statement against RDBMS. |
(package private) static java.lang.Object |
getObjectFromColumn(java.sql.ResultSet rs,
FieldDescriptor fld)
retrieves an Object from a ResultSet column. |
(package private) static java.lang.Object |
getObjectFromColumn(java.sql.ResultSet rs,
int jdbcType,
int columnId)
|
(package private) static int |
getSqlTypeAll(ClassDescriptor cld,
int index)
determines the JDBC type (represented as an int value as specified by java.sql.Types) of a FieldDescriptor idetified by index. |
(package private) static int |
getSqlTypeNonPk(ClassDescriptor cld,
int index)
determines the JDBC type (represented as an int value as specified by java.sql.Types) of a FieldDescriptor idetified by index. |
(package private) static int |
getSqlTypePk(ClassDescriptor cld,
int index)
determines the JDBC type (represented as an int value as specified by java.sql.Types) of a FieldDescriptor idetified by index. |
java.lang.Object |
materializeObject(ClassDescriptor mif,
Identity oid)
performs a primary key lookup operation against RDBMS and materializes an object from the resulting row. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JdbcAccess(PersistenceBrokerImpl broker)
Method Detail |
public int executeCount(Query query, ClassDescriptor mif) throws PersistenceBrokerException
query
- the query string.mif
- ClassDescriptor providing JDBC information.
PersistenceBrokerException
public void executeDelete(ClassDescriptor mif, java.lang.Object obj) throws PersistenceBrokerException
mif
- ClassDescriptor providing mapping information.obj
- The object to be deleted.
PersistenceBrokerException
public void executeInsert(ClassDescriptor mif, java.lang.Object obj) throws PersistenceBrokerException
obj
- The Object to be inserted as a row of the underlying table.mif
- ClassDescriptor providing mapping information.
PersistenceBrokerException
java.sql.ResultSet executeQuery(Query query, ClassDescriptor mif) throws PersistenceBrokerException
query
- the query string.mif
- ClassDescriptor providing JDBC information.
PersistenceBrokerException
java.sql.ResultSet executeSQL(java.lang.String sqlStatement, ClassDescriptor cld) throws PersistenceBrokerException
sqlStatement
- the query string.cld
- ClassDescriptor providing meta-information.
PersistenceBrokerException
public int executeUpdateSQL(java.lang.String sqlStatement, ClassDescriptor cld) throws PersistenceBrokerException
sqlStatement
- the query string.cld
- ClassDescriptor providing meta-information.
PersistenceBrokerException
public void executeUpdate(ClassDescriptor mif, java.lang.Object obj) throws PersistenceBrokerException
obj
- The Object to be updated in the underlying table.mif
- ClassDescriptor providing mapping information.
PersistenceBrokerException
public java.lang.Object materializeObject(ClassDescriptor mif, Identity oid) throws PersistenceBrokerException
oid
- contains the primary key info.mif
- ClassDescriptor providing mapping information.
PersistenceBrokerException
static java.lang.Object getObjectFromColumn(java.sql.ResultSet rs, FieldDescriptor fld) throws java.sql.SQLException
rs
- the ResultSet to be read from.fld
- The FieldDescriptor containing metainfo on the column:
it contins info on the expected JDBC Type and the name of the column.
java.sql.SQLException
static java.lang.Object getObjectFromColumn(java.sql.ResultSet rs, int jdbcType, int columnId) throws java.sql.SQLException
java.sql.SQLException
static int getSqlTypeAll(ClassDescriptor cld, int index)
cld
- The ClassDescriptor containing the FieldDescriptor.index
- index identifies the FieldDescriptor within cld.
static int getSqlTypeNonPk(ClassDescriptor cld, int index)
cld
- The ClassDescriptor containing the FieldDescriptor.index
- index identifies the FieldDescriptor within the
Non-PrimaryKey-fields of cld.
static int getSqlTypePk(ClassDescriptor cld, int index)
cld
- The ClassDescriptor containing the FieldDescriptor.index
- index identifies the FieldDescriptor within the
PrimaryKey-fields of cld.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |