|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJdbcControlImpl
public class JdbcControlImpl
The implementation class for the database controller.
Nested Class Summary |
---|
Field Summary | |
---|---|
protected Connection |
_connection
|
protected JdbcControl.ConnectionDataSource |
_connectionDataSource
|
protected JdbcControl.ConnectionDriver |
_connectionDriver
|
protected ControlBeanContext |
_context
|
protected DataSource |
_dataSource
|
protected ResourceContext |
_resourceContext
|
protected static HashMap<Class,ResultSetMapper> |
_resultMappers
|
protected static Class<?> |
_xmlObjectClass
|
Fields inherited from interface JdbcControl |
---|
DEFAULT_FETCH_SIZE, MAXROWS_ALL |
Constructor Summary | |
---|---|
JdbcControlImpl()
Constructor |
Method Summary | |
---|---|
protected Object |
execPreparedStatement(Method method,
Object[] args)
Create and exec a PreparedStatement |
Connection |
getConnection()
Returns a database connection to the server associated with the control. |
Calendar |
getDataSourceCalendar()
Returns the Calendar used when working with time/date types. |
Object |
invoke(Method method,
Object[] args)
Called by the Controls runtime to handle calls to methods of an extensible control. |
void |
onAquire()
Invoked by the controls runtime when a new instance of this class is aquired by the runtime |
void |
onRelease()
Invoked by the controls runtime when an instance of this class is released by the runtime |
void |
setDataSourceCalendar(Calendar cal)
Sets the Calendar used when working with time/date types |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ControlBeanContext _context
protected ResourceContext _resourceContext
protected transient Connection _connection
protected transient JdbcControl.ConnectionDataSource _connectionDataSource
protected transient DataSource _dataSource
protected transient JdbcControl.ConnectionDriver _connectionDriver
protected static final HashMap<Class,ResultSetMapper> _resultMappers
protected static Class<?> _xmlObjectClass
Constructor Detail |
---|
public JdbcControlImpl()
Method Detail |
---|
public void onAquire()
public void onRelease()
public Connection getConnection() throws SQLException
getConnection
in interface JdbcControl
SQLException
public Object invoke(Method method, Object[] args) throws Throwable
invoke
in interface Extensible
method
- The extended operation that was called.args
- Parameters of the operation.
Throwable
- any exception declared on the extended operation may be
thrown. If a checked exception is thrown from the implementation that is not declared
on the original interface, it will be wrapped in a ControlException.public void setDataSourceCalendar(Calendar cal)
Calendar
used when working with time/date types
setDataSourceCalendar
in interface JdbcControl
java.sql.ResultSet#getDate(int, Calendar)
,
java.sql.ResultSet#getTime(int, Calendar)
,
java.sql.ResultSet#getTimestamp(int, Calendar)
,
java.sql.PreparedStatement#setDate(int, Date, Calendar)
,
java.sql.PreparedStatement#setTime(int, Time, Calendar)
,
java.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar)
public Calendar getDataSourceCalendar()
Calendar
used when working with time/date types.
getDataSourceCalendar
in interface JdbcControl
Calendar
to use with this DataSource
protected Object execPreparedStatement(Method method, Object[] args) throws Throwable
PreparedStatement
method
- the method to invokeargs
- the method's arguments
PreparedStatement
Throwable
- any exception that occurs; the caller should handle these appropriately
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |