Class MConnection
- java.lang.Object
-
- com.mckoi.database.jdbc.MConnection
-
- All Implemented Interfaces:
DatabaseCallBack
,java.lang.AutoCloseable
,java.sql.Connection
,java.sql.Wrapper
- Direct Known Subclasses:
InternalJDBCHelper.InternalConnection
public class MConnection extends java.lang.Object implements java.sql.Connection, DatabaseCallBack
JDBC implementation of the connection object to a Mckoi database. The implementation specifics for how the connection talks with the database is left up to the implementation of DatabaseInterface.This object is thread safe. It may be accessed safely from concurrent threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
MConnection.TriggerDispatchThread
The thread that handles all dispatching of trigger events.
-
Field Summary
Fields Modifier and Type Field Description private boolean
auto_commit
Set to true if the connection is in auto-commit mode.private boolean
case_insensitive_identifiers
This is set to true if the MResultSet column lookup methods are case insensitive.private DatabaseInterface
db_interface
The interface to the database.private java.sql.SQLWarning
head_warning
SQL warnings for this connection.private boolean
is_closed
Set to true if the connection is closed.private java.lang.Object
lock
private RowCache
row_cache
A cache of all rows retrieved from the server.private java.util.Hashtable
s_object_hold
A mapping from a streamable object id to InputStream used to represent the object when being uploaded to the database engine.private long
s_object_id
An unique id count given to streamable object being uploaded to the server.private boolean
strict_get_object
If the ResultSet.getObject method should return the raw object type (eg.private java.util.Vector
trigger_list
The list of trigger listeners registered with the connection.private MConnection.TriggerDispatchThread
trigger_thread
A Thread that handles all dispatching of trigger events to the JDBC client.private java.lang.String
url
The JDBC URL used to make this connection.private boolean
verbose_column_names
If the ResultSetMetaData.getColumnName method should return a succinct form of the column name as most JDBC implementations do, this should be set to false (the default).
-
Constructor Summary
Constructors Constructor Description MConnection(java.lang.String url, DatabaseInterface db_interface, int cache_size, int max_size)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.util.concurrent.Executor executor)
protected void
addSQLWarning(java.sql.SQLWarning warning)
Adds a new SQLWarning to the chain.(package private) void
addTriggerListener(java.lang.String trigger_name, TriggerListener listener)
Adds a TriggerListener that listens for all triggers events with the name given.void
clearWarnings()
void
close()
void
commit()
java.sql.Array
createArrayOf(java.lang.String typeName, java.lang.Object[] elements)
java.sql.Blob
createBlob()
java.sql.Clob
createClob()
java.sql.NClob
createNClob()
java.sql.SQLXML
createSQLXML()
java.sql.Statement
createStatement()
java.sql.Statement
createStatement(int resultSetType, int resultSetConcurrency)
java.sql.Statement
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
(package private) StreamableObject
createStreamableObject(java.io.InputStream x, int length, byte type)
Creates a StreamableObject on the JDBC client side given an InputStream, and length and a type.java.sql.Struct
createStruct(java.lang.String typeName, java.lang.Object[] attributes)
void
databaseEvent(int event_type, java.lang.String event_message)
Called when the database has generated an event that this user is listening for.(package private) void
disposeResult(int result_id)
Disposes of the server-side resources associated with the result set with result_id.(package private) void
executeQueries(SQLQuery[] queries, MResultSet[] results)
Sends the batch of SQLQuery objects to the database to be executed.(package private) void
executeQuery(SQLQuery sql, MResultSet result_set)
Sends the SQL string to the database to be executed.boolean
getAutoCommit()
java.lang.String
getCatalog()
java.util.Properties
getClientInfo()
java.lang.String
getClientInfo(java.lang.String name)
int
getHoldability()
(package private) MckoiConnection
getMckoiConnection()
Returns this MConnection wrapped in a MckoiConnection object.java.sql.DatabaseMetaData
getMetaData()
int
getNetworkTimeout()
protected RowCache
getRowCache()
Returns the row Cache object for this connection.java.lang.String
getSchema()
int
getTransactionIsolation()
java.util.Map
getTypeMap()
(package private) java.lang.String
getURL()
Returns the url string used to make this connection.java.sql.SQLWarning
getWarnings()
void
internalClose()
Closes this connection by calling the 'dispose' method in the database interface.boolean
isCaseInsensitiveIdentifiers()
Returns true if the database has case insensitive identifiers.boolean
isClosed()
boolean
isReadOnly()
boolean
isStrictGetObject()
Returns true if strict get object is enabled (default).boolean
isValid(int timeout)
boolean
isWrapperFor(java.lang.Class iface)
void
login(java.lang.String default_schema, java.lang.String username, java.lang.String password)
Attempts to login to the database interface with the given default schema, username and password.(package private) void
login(java.util.Properties info, java.lang.String default_schema)
Logs into the JDBC server running on a remote machine.java.lang.String
nativeSQL(java.lang.String sql)
java.sql.CallableStatement
prepareCall(java.lang.String sql)
java.sql.CallableStatement
prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency)
java.sql.CallableStatement
prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int autoGeneratedKeys)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int[] columnIndexes)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
java.sql.PreparedStatement
prepareStatement(java.lang.String sql, java.lang.String[] columnNames)
void
releaseSavepoint(java.sql.Savepoint savepoint)
(package private) void
removeStreamableObject(StreamableObject s_object)
Removes the StreamableObject from the hold on the JDBC client.(package private) void
removeTriggerListener(java.lang.String trigger_name, TriggerListener listener)
Removes the TriggerListener for the given trigger name.(package private) ResultPart
requestResultPart(int result_id, int start_row, int count_rows)
Called by MResultSet to query a part of a result from the server.(package private) StreamableObjectPart
requestStreamableObjectPart(int result_id, long streamable_object_id, long offset, int len)
Requests a part of a streamable object from the server.void
rollback()
void
rollback(java.sql.Savepoint savepoint)
void
setAutoCommit(boolean autoCommit)
void
setCaseInsensitiveIdentifiers(boolean status)
Toggles whether this connection is handling identifiers as case insensitive or not.void
setCatalog(java.lang.String catalog)
void
setClientInfo(java.lang.String name, java.lang.String value)
void
setClientInfo(java.util.Properties properties)
void
setHoldability(int holdability)
void
setNetworkTimeout(java.util.concurrent.Executor executor, int timeout)
void
setReadOnly(boolean readOnly)
java.sql.Savepoint
setSavepoint()
java.sql.Savepoint
setSavepoint(java.lang.String name)
void
setSchema(java.lang.String schema)
void
setStrictGetObject(boolean status)
Toggles strict get object.void
setTransactionIsolation(int level)
void
setTypeMap(java.util.Map map)
void
setVerboseColumnNames(boolean status)
Toggles verbose column names from ResultSetMetaData.java.lang.Object
unwrap(java.lang.Class iface)
private void
uploadStreamableObjects(SQLQuery sql)
Uploads any streamable objects found in an SQLQuery into the database.boolean
verboseColumnNames()
Returns true if ResultSetMetaData should return verbose column names.
-
-
-
Field Detail
-
row_cache
private RowCache row_cache
A cache of all rows retrieved from the server. This cuts down the number of requests to the server by caching rows that are accessed frequently. Note that cells are only cached within a ResultSet bounds. Two different ResultSet's will not share cells in the cache.
-
url
private java.lang.String url
The JDBC URL used to make this connection.
-
head_warning
private java.sql.SQLWarning head_warning
SQL warnings for this connection.
-
is_closed
private boolean is_closed
Set to true if the connection is closed.
-
auto_commit
private boolean auto_commit
Set to true if the connection is in auto-commit mode. (By default, auto_commit is enabled).
-
db_interface
private DatabaseInterface db_interface
The interface to the database.
-
trigger_list
private java.util.Vector trigger_list
The list of trigger listeners registered with the connection.
-
trigger_thread
private MConnection.TriggerDispatchThread trigger_thread
A Thread that handles all dispatching of trigger events to the JDBC client.
-
strict_get_object
private boolean strict_get_object
If the ResultSet.getObject method should return the raw object type (eg. BigDecimal for Integer, String for chars, etc) then this is set to false. If this is true (the default) the 'getObject' methods return the correct object types as specified by the JDBC specification.
-
verbose_column_names
private boolean verbose_column_names
If the ResultSetMetaData.getColumnName method should return a succinct form of the column name as most JDBC implementations do, this should be set to false (the default). If old style verbose column names should be returned for compatibility with older Mckoi applications, this is set to true.
-
case_insensitive_identifiers
private boolean case_insensitive_identifiers
This is set to true if the MResultSet column lookup methods are case insensitive. This should be set to true for any database that has case insensitive identifiers.
-
s_object_hold
private java.util.Hashtable s_object_hold
A mapping from a streamable object id to InputStream used to represent the object when being uploaded to the database engine.
-
s_object_id
private long s_object_id
An unique id count given to streamable object being uploaded to the server.
-
lock
private java.lang.Object lock
-
-
Constructor Detail
-
MConnection
public MConnection(java.lang.String url, DatabaseInterface db_interface, int cache_size, int max_size)
Constructor.
-
-
Method Detail
-
setStrictGetObject
public void setStrictGetObject(boolean status)
Toggles strict get object.If the 'getObject' method should return the raw object type (eg. BigDecimal for Integer, String for chars, etc) then this is set to false. If this is true (the default) the 'getObject' methods return the correct object types as specified by the JDBC specification.
The default is true.
-
isStrictGetObject
public boolean isStrictGetObject()
Returns true if strict get object is enabled (default).
-
setVerboseColumnNames
public void setVerboseColumnNames(boolean status)
Toggles verbose column names from ResultSetMetaData.If this is set to true, getColumnName will return 'APP.Part.id' for a column name. If it is false getColumnName will return 'id'. This property is for compatibility with older Mckoi applications.
-
verboseColumnNames
public boolean verboseColumnNames()
Returns true if ResultSetMetaData should return verbose column names.
-
setCaseInsensitiveIdentifiers
public void setCaseInsensitiveIdentifiers(boolean status)
Toggles whether this connection is handling identifiers as case insensitive or not. If this is true then 'getString("app.id")' will match against 'APP.id', etc.
-
isCaseInsensitiveIdentifiers
public boolean isCaseInsensitiveIdentifiers()
Returns true if the database has case insensitive identifiers.
-
getRowCache
protected final RowCache getRowCache()
Returns the row Cache object for this connection.
-
addSQLWarning
protected final void addSQLWarning(java.sql.SQLWarning warning)
Adds a new SQLWarning to the chain.
-
internalClose
public final void internalClose() throws java.sql.SQLException
Closes this connection by calling the 'dispose' method in the database interface.- Throws:
java.sql.SQLException
-
getMckoiConnection
MckoiConnection getMckoiConnection()
Returns this MConnection wrapped in a MckoiConnection object.
-
login
public void login(java.lang.String default_schema, java.lang.String username, java.lang.String password) throws java.sql.SQLException
Attempts to login to the database interface with the given default schema, username and password. If the authentication fails an SQL exception is generated.- Throws:
java.sql.SQLException
-
getURL
java.lang.String getURL()
Returns the url string used to make this connection.
-
login
void login(java.util.Properties info, java.lang.String default_schema) throws java.sql.SQLException
Logs into the JDBC server running on a remote machine. Throws an exception if user authentication fails.- Throws:
java.sql.SQLException
-
uploadStreamableObjects
private void uploadStreamableObjects(SQLQuery sql) throws java.sql.SQLException
Uploads any streamable objects found in an SQLQuery into the database.- Throws:
java.sql.SQLException
-
executeQueries
void executeQueries(SQLQuery[] queries, MResultSet[] results) throws java.sql.SQLException
Sends the batch of SQLQuery objects to the database to be executed. The given array of MResultSet will be the consumer objects for the query results. If a query succeeds then we are guarenteed to know that size of the result set.This method blocks until all of the queries have been processed by the database.
- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(SQLQuery sql, MResultSet result_set) throws java.sql.SQLException
Sends the SQL string to the database to be executed. The given MResultSet is the consumer for the results from the database. We are guarenteed that if the query succeeds that we know the size of the result set and at least first first row of the set.This method will block until we have received the result header information.
- Throws:
java.sql.SQLException
-
requestResultPart
ResultPart requestResultPart(int result_id, int start_row, int count_rows) throws java.sql.SQLException
Called by MResultSet to query a part of a result from the server. Returns a List that represents the result from the server.- Throws:
java.sql.SQLException
-
requestStreamableObjectPart
StreamableObjectPart requestStreamableObjectPart(int result_id, long streamable_object_id, long offset, int len) throws java.sql.SQLException
Requests a part of a streamable object from the server.- Throws:
java.sql.SQLException
-
disposeResult
void disposeResult(int result_id) throws java.sql.SQLException
Disposes of the server-side resources associated with the result set with result_id. This should be called either before we start the download of a new result set, or when we have finished with the resources of a result set.- Throws:
java.sql.SQLException
-
addTriggerListener
void addTriggerListener(java.lang.String trigger_name, TriggerListener listener)
Adds a TriggerListener that listens for all triggers events with the name given. Triggers are created with the 'CREATE TRIGGER' syntax.
-
removeTriggerListener
void removeTriggerListener(java.lang.String trigger_name, TriggerListener listener)
Removes the TriggerListener for the given trigger name.
-
createStreamableObject
StreamableObject createStreamableObject(java.io.InputStream x, int length, byte type)
Creates a StreamableObject on the JDBC client side given an InputStream, and length and a type. When this method returns, a StreamableObject entry will be added to the hold.
-
removeStreamableObject
void removeStreamableObject(StreamableObject s_object)
Removes the StreamableObject from the hold on the JDBC client. This should be called when the MPreparedStatement closes.
-
databaseEvent
public void databaseEvent(int event_type, java.lang.String event_message)
Description copied from interface:DatabaseCallBack
Called when the database has generated an event that this user is listening for.NOTE: The thread that calls back these events is always a volatile thread that may not block. It is especially important that no queries are executed when this calls back. To safely act on events, it is advisable to dispatch onto another thread such as the SwingEventDispatcher thread.
- Specified by:
databaseEvent
in interfaceDatabaseCallBack
-
createStatement
public java.sql.Statement createStatement() throws java.sql.SQLException
- Specified by:
createStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
- Specified by:
prepareCall
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
nativeSQL
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
- Specified by:
nativeSQL
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
- Specified by:
setAutoCommit
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getAutoCommit
public boolean getAutoCommit() throws java.sql.SQLException
- Specified by:
getAutoCommit
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
commit
public void commit() throws java.sql.SQLException
- Specified by:
commit
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
rollback
public void rollback() throws java.sql.SQLException
- Specified by:
rollback
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
close
public void close() throws java.sql.SQLException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
isClosed
public boolean isClosed() throws java.sql.SQLException
- Specified by:
isClosed
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getMetaData
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
- Specified by:
getMetaData
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setReadOnly
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
- Specified by:
setReadOnly
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
isReadOnly
public boolean isReadOnly() throws java.sql.SQLException
- Specified by:
isReadOnly
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setCatalog
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
- Specified by:
setCatalog
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getCatalog
public java.lang.String getCatalog() throws java.sql.SQLException
- Specified by:
getCatalog
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setTransactionIsolation
public void setTransactionIsolation(int level) throws java.sql.SQLException
- Specified by:
setTransactionIsolation
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getTransactionIsolation
public int getTransactionIsolation() throws java.sql.SQLException
- Specified by:
getTransactionIsolation
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Specified by:
getWarnings
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
clearWarnings
public void clearWarnings() throws java.sql.SQLException
- Specified by:
clearWarnings
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createStatement
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
- Specified by:
createStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
- Specified by:
prepareCall
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getTypeMap
public java.util.Map getTypeMap() throws java.sql.SQLException
- Specified by:
getTypeMap
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setTypeMap
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
- Specified by:
setTypeMap
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setHoldability
public void setHoldability(int holdability) throws java.sql.SQLException
- Specified by:
setHoldability
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getHoldability
public int getHoldability() throws java.sql.SQLException
- Specified by:
getHoldability
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setSavepoint
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
- Specified by:
setSavepoint
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
- Specified by:
setSavepoint
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
rollback
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Specified by:
rollback
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
- Specified by:
releaseSavepoint
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createStatement
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
- Specified by:
createStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
- Specified by:
prepareCall
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
- Specified by:
prepareStatement
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createClob
public java.sql.Clob createClob() throws java.sql.SQLException
- Specified by:
createClob
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createBlob
public java.sql.Blob createBlob() throws java.sql.SQLException
- Specified by:
createBlob
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createNClob
public java.sql.NClob createNClob() throws java.sql.SQLException
- Specified by:
createNClob
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createSQLXML
public java.sql.SQLXML createSQLXML() throws java.sql.SQLException
- Specified by:
createSQLXML
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
isValid
public boolean isValid(int timeout) throws java.sql.SQLException
- Specified by:
isValid
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setClientInfo
public void setClientInfo(java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
- Specified by:
setClientInfo
in interfacejava.sql.Connection
- Throws:
java.sql.SQLClientInfoException
-
setClientInfo
public void setClientInfo(java.util.Properties properties) throws java.sql.SQLClientInfoException
- Specified by:
setClientInfo
in interfacejava.sql.Connection
- Throws:
java.sql.SQLClientInfoException
-
getClientInfo
public java.lang.String getClientInfo(java.lang.String name) throws java.sql.SQLException
- Specified by:
getClientInfo
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getClientInfo
public java.util.Properties getClientInfo() throws java.sql.SQLException
- Specified by:
getClientInfo
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createArrayOf
public java.sql.Array createArrayOf(java.lang.String typeName, java.lang.Object[] elements) throws java.sql.SQLException
- Specified by:
createArrayOf
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
createStruct
public java.sql.Struct createStruct(java.lang.String typeName, java.lang.Object[] attributes) throws java.sql.SQLException
- Specified by:
createStruct
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
unwrap
public java.lang.Object unwrap(java.lang.Class iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
getNetworkTimeout
public int getNetworkTimeout() throws java.sql.SQLException
- Specified by:
getNetworkTimeout
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setNetworkTimeout
public void setNetworkTimeout(java.util.concurrent.Executor executor, int timeout) throws java.sql.SQLException
- Specified by:
setNetworkTimeout
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
abort
public void abort(java.util.concurrent.Executor executor) throws java.sql.SQLException
- Specified by:
abort
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
getSchema
public java.lang.String getSchema() throws java.sql.SQLException
- Specified by:
getSchema
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
setSchema
public void setSchema(java.lang.String schema) throws java.sql.SQLException
- Specified by:
setSchema
in interfacejava.sql.Connection
- Throws:
java.sql.SQLException
-
-