|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.idms.io.TraceObject ca.idms.jdbc.IdmsJdbcObject
public abstract class IdmsJdbcObject
Common base class for the CA IDMS JDBC driver. This class makes common objects accessible and provides common routines, most of which are related to exception handling, including:
IdmsJdbcDriver
and
IdmsDataSource
.
Field Summary | |
---|---|
static java.lang.String |
FAKE_METHODS
Resource bundle name for fake support methods. |
static java.lang.String |
FAKE_SUPPORT
System property name to enable "fake support". |
static int |
fakeSupport
Indicates how to handle unsupported JDBC APIs. |
static java.lang.String |
MESSAGES
Resource bundle name for exception message |
Fields inherited from class ca.idms.io.TraceObject |
---|
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE |
Fields inherited from interface ca.idms.qcli.SQLState |
---|
SQL_00000, SQL_01000, SQL_01004, SQL_07001, SQL_07009, SQL_08001, SQL_08002, SQL_08003, SQL_08004, SQL_08006, SQL_08007, SQL_0A000, SQL_21000, SQL_22000, SQL_22001, SQL_22003, SQL_22005, SQL_22007, SQL_24000, SQL_25000, SQL_3C000, SQL_40000, SQL_42000, SQL_HY000, SQL_HY004, SQL_HY009, SQL_HY010, SQL_HY024, SQL_HY106, SQL_HYC00 |
Method Summary | ||
---|---|---|
void |
clearWarnings()
Sets the warning chain to null. |
|
protected java.lang.Object |
get(java.lang.reflect.Field f)
Allows the default snap method access to non-public variables. |
|
java.sql.SQLWarning |
getWarnings()
The first warning reported by calls on this object is returned. |
|
boolean |
hasCursor()
Checks the detailed transaction state. |
|
boolean |
hasUpdate()
Checks the detailed transaction state. |
|
boolean |
isStarted()
Checks the transaction state. |
|
boolean |
isSuspended()
Checks the session state. |
|
boolean |
isWrapperFor(java.lang.Class<?> c)
Returns true if this object either implements the class or interface argument. |
|
void |
notifyStatementError(java.sql.SQLException ex)
This utility method can be called to invoke the notifyStatementError method which resides in IdmsPooledConnection. |
|
|
unwrap(java.lang.Class<T> c)
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by a proxy object. |
Methods inherited from class ca.idms.io.TraceObject |
---|
finalize, getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MESSAGES
public static int fakeSupport
A value of -1 will enable simulation of
This is controlled by the FAKE_METHODS
fake methods resource
bundle. This properties file defines a table of fully qualified
method names and an hexadecimal integer values acting as a bit flags
indicating the "fake support level", for example:
ca.idms.jdbc.Savepoint.getSavePointName=FFFFFFFF ca.idms.jdbc.Connection.setSavePoint=80000000When an unsupported method is invoked, if the bit from the entry for the method is set in
fakeSupport
the driver will
pretend to execute the method if possible, otherwise the driver
will throw an SQLException. In the example above, the driver will
always simulate the getSavePointName method when fakeSupport is
non-zero, but will only simulate setSavePoint if the high order
bit is set in fakeSupport.
When fakeSupport == 0 or -1 there is no need to check the resource bundle at all, so we don't. Entries are cached in a Hashtable to minimize the performance impact, but applications should not really be calling these methods anyway, since the DatabaseMetaData methods clearly say the corresponding features are not supported.
A Java application can enable this by setting the value in any
object derived from this class (such as IdmsConnection
).
It can also be enabled by setting the system property
ca.jdbc.fake.support=value
.
public static final java.lang.String FAKE_SUPPORT
public static final java.lang.String FAKE_METHODS
Method Detail |
---|
protected java.lang.Object get(java.lang.reflect.Field f) throws java.lang.IllegalAccessException
get
in class TraceObject
f
- a Field returned by Class.getDeclaredFields
java.lang.IllegalAccessException
- should not happenTraceObject.snap
,
TraceObject.snap()
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
This method satisfies the JDBC interface for derived classes.
java.sql.SQLException
- not!public void clearWarnings() throws java.sql.SQLException
java.sql.SQLException
- not!.public void notifyStatementError(java.sql.SQLException ex)
public boolean isWrapperFor(java.lang.Class<?> c) throws java.sql.SQLException
c
- class or interface.
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> c) throws java.sql.SQLException
c
- class or interface.
java.sql.SQLException
- - If no object found.public boolean isSuspended()
When all sessions are suspended the CA IDMS task ends.
public boolean isStarted()
public boolean hasUpdate()
public boolean hasCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |