|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.jdbc.WrapperImpl
org.teiid.jdbc.ConnectionImpl
public class ConnectionImpl
Teiid's Connection implementation.
Field Summary | |
---|---|
static int |
DEFAULT_ISOLATION
|
protected java.util.Properties |
propInfo
|
protected ServerConnection |
serverConn
|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
ConnectionImpl(ServerConnection serverConn,
java.util.Properties info,
java.lang.String url)
|
Method Summary | |
---|---|
void |
changeUser(java.lang.String userName,
java.lang.String newPassword)
Re-authenticate with the given username and password. |
void |
clearWarnings()
|
void |
close()
|
void |
commit()
This method makes any changes involved in a transaction permanent and releases any locks held by the connection object. |
protected void |
commitTransaction(XidImpl arg0,
boolean arg1)
|
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)
Creates a Statement object that will produce ResultSet objects of the type resultSetType and concurrency level resultSetConcurrency. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
|
protected void |
endTransaction(XidImpl arg0,
int arg1)
|
protected void |
forgetTransaction(XidImpl arg0)
|
java.util.Collection<Annotation> |
getAnnotations()
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.util.Properties |
getClientInfo()
|
java.lang.String |
getClientInfo(java.lang.String name)
|
java.lang.String |
getConnectionId()
Connection identifier of this connection |
PlanNode |
getCurrentPlanDescription()
|
java.lang.String |
getDatabaseName()
Get the database name that this connection is representing |
java.lang.String |
getDebugLog()
|
protected java.util.Properties |
getExecutionProperties()
|
int |
getHoldability()
Retrieves the current holdability of ResultSet objects created using this Connection object. |
DatabaseMetaDataImpl |
getMetaData()
|
int |
getTransactionIsolation()
|
protected XidImpl |
getTransactionXid()
|
java.util.Map |
getTypeMap()
Retreives the type map associated with this Connection object. |
int |
getVDBVersion()
|
java.sql.SQLWarning |
getWarnings()
This method will return the first warning reported by calls on this connection, or null if none exist. |
boolean |
isClosed()
This method will return whether this connection is closed or not. |
boolean |
isReadOnly()
|
boolean |
isSameProcess(ConnectionImpl conn)
|
boolean |
isValid(int timeout)
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Creates a CallableStatement object that contains sql and that will produce ResultSet objects that are non-scrollable and non-updatable. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Creates a CallableStatement object that contains a sql and that will produce ResultSet objects of the type resultSetType and with a concurrency level of resultSetConcurrency. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
PreparedStatementImpl |
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)
|
PreparedStatementImpl |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Creates a PreparedStatement object that contains a sql and that will produce ResultSet objects of the type resultSetType and with a concurrency level of 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)
|
protected int |
prepareTransaction(XidImpl arg0)
|
protected javax.transaction.xa.Xid[] |
recoverTransaction(int arg0)
|
void |
recycleConnection()
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(boolean startTxn)
Rollback the current local transaction |
void |
rollback(java.sql.Savepoint savepoint)
|
protected void |
rollbackTransaction(XidImpl arg0)
|
void |
setAnnotations(java.util.Collection<Annotation> annotations)
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
Teiid does not allow setting a catalog through a connection. |
void |
setClientInfo(java.util.Properties properties)
|
void |
setClientInfo(java.lang.String name,
java.lang.String value)
|
void |
setCurrentPlanDescription(PlanNode currentPlanDescription)
|
void |
setDebugLog(java.lang.String debugLog)
|
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean readOnly)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
|
protected void |
startTransaction(XidImpl arg0,
int arg1,
int timeout)
|
Methods inherited from class org.teiid.jdbc.WrapperImpl |
---|
isWrapperFor, unwrap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
public static final int DEFAULT_ISOLATION
protected java.util.Properties propInfo
protected ServerConnection serverConn
Constructor Detail |
---|
public ConnectionImpl(ServerConnection serverConn, java.util.Properties info, java.lang.String url)
Method Detail |
---|
public java.util.Collection<Annotation> getAnnotations()
public void setAnnotations(java.util.Collection<Annotation> annotations)
public java.lang.String getDebugLog()
public void setDebugLog(java.lang.String debugLog)
public PlanNode getCurrentPlanDescription()
public void setCurrentPlanDescription(PlanNode currentPlanDescription)
protected java.util.Properties getExecutionProperties()
public java.lang.String getConnectionId()
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
java.sql.SQLException
public void commit() throws java.sql.SQLException
This method makes any changes involved in a transaction permanent and releases any locks held by the connection object. This is only used when auto-commit is set to false.
commit
in interface java.sql.Connection
java.sql.SQLException
- if the transaction had been rolled back or marked to roll back.public java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
Creates a Statement object that will produce ResultSet objects of the type resultSetType and concurrency level resultSetConcurrency.
createStatement
in interface java.sql.Connection
intvalue
- indicating the ResultSet's typeintValue
- indicating the ResultSet's concurrency
java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
public int getVDBVersion() throws java.sql.SQLException
java.sql.SQLException
public DatabaseMetaDataImpl getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getDatabaseName()
public int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
holdability
- int indicating the holdability
java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
SQLException,
- should never occur
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
This method will return the first warning reported by calls on this connection, or null if none exist.
getWarnings
in interface java.sql.Connection
SQLException,
- should never occur
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
This method will return whether this connection is closed or not.
isClosed
in interface java.sql.Connection
SQLException,
- should never occur
java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
Creates a CallableStatement object that contains sql and that will produce ResultSet objects that are non-scrollable and non-updatable. A SQL stored procedure call statement is handled by creating a CallableStatement for it.
prepareCall
in interface java.sql.Connection
sql
- String(escape syntax) for invoking a stored procedure.
java.sql.SQLException
- if there is an error creating the callable statement objectpublic java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
Creates a CallableStatement object that contains a sql and that will produce ResultSet objects of the type resultSetType and with a concurrency level of resultSetConcurrency. A SQL stored procedure call statement is handled by creating a CallableStatement for it.
prepareCall
in interface java.sql.Connection
sql
- String(escape syntax) for invoking a stored procedure.intvalue
- indicating the ResultSet's typeintValue
- indicating the ResultSet's concurrency
java.sql.SQLException
public PreparedStatementImpl prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public PreparedStatementImpl prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
Creates a PreparedStatement object that contains a sql and that will produce ResultSet objects of the type resultSetType and with a concurrency level of resultSetConcurrency.
prepareStatement
in interface java.sql.Connection
sql
- string representing a prepared statementintvalue
- indicating the ResultSet's typeintValue
- indicating the ResultSet's concurrency
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void rollback(boolean startTxn) throws java.sql.SQLException
startTxn
-
java.sql.SQLException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
Teiid does not allow setting a catalog through a connection. This method silently ignores the request as per the specification.
setCatalog
in interface java.sql.Connection
The
- string values which sets the catalog name on the connection.
java.sql.SQLException
- This should never occur.public void setReadOnly(boolean readOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
A
- boolean value specifying whether the connection is readonly.
throws
- SQLException.
java.sql.SQLException
protected void commitTransaction(XidImpl arg0, boolean arg1) throws java.sql.SQLException
java.sql.SQLException
protected void endTransaction(XidImpl arg0, int arg1) throws java.sql.SQLException
java.sql.SQLException
protected void forgetTransaction(XidImpl arg0) throws java.sql.SQLException
java.sql.SQLException
protected int prepareTransaction(XidImpl arg0) throws java.sql.SQLException
java.sql.SQLException
protected javax.transaction.xa.Xid[] recoverTransaction(int arg0) throws java.sql.SQLException
java.sql.SQLException
protected void rollbackTransaction(XidImpl arg0) throws java.sql.SQLException
java.sql.SQLException
protected void startTransaction(XidImpl arg0, int arg1, int timeout) throws java.sql.SQLException
java.sql.SQLException
protected XidImpl getTransactionXid()
public boolean isValid(int timeout) throws java.sql.SQLException
isValid
in interface java.sql.Connection
java.sql.SQLException
public void recycleConnection()
public boolean isSameProcess(ConnectionImpl conn) throws CommunicationException
CommunicationException
public void setClientInfo(java.util.Properties properties) throws java.sql.SQLClientInfoException
setClientInfo
in interface java.sql.Connection
java.sql.SQLClientInfoException
public void setClientInfo(java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
setClientInfo
in interface java.sql.Connection
java.sql.SQLClientInfoException
public java.util.Properties getClientInfo() throws java.sql.SQLException
getClientInfo
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getClientInfo(java.lang.String name) throws java.sql.SQLException
getClientInfo
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Array createArrayOf(java.lang.String typeName, java.lang.Object[] elements) throws java.sql.SQLException
createArrayOf
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Blob createBlob() throws java.sql.SQLException
createBlob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Clob createClob() throws java.sql.SQLException
createClob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.NClob createNClob() throws java.sql.SQLException
createNClob
in interface java.sql.Connection
java.sql.SQLException
public java.sql.SQLXML createSQLXML() throws java.sql.SQLException
createSQLXML
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String typeName, java.lang.Object[] attributes) throws java.sql.SQLException
createStruct
in interface java.sql.Connection
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
releaseSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void setHoldability(int holdability) throws java.sql.SQLException
setHoldability
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String name) throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void setTransactionIsolation(int level) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
java.sql.SQLException
public void changeUser(java.lang.String userName, java.lang.String newPassword) throws java.sql.SQLException
TeiidConnection
changeUser
in interface TeiidConnection
userName
- the username to authenticate withnewPassword
- the password to authenticate with
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |