railo.runtime.db
Class DatasourceConnectionImpl

java.lang.Object
  extended by railo.runtime.db.DatasourceConnectionImpl
All Implemented Interfaces:
DatasourceConnection, DatasourceConnectionPro

public final class DatasourceConnectionImpl
extends Object
implements DatasourceConnectionPro

wrap for datasorce and connection from it


Constructor Summary
DatasourceConnectionImpl(Connection connection, DataSource datasource, String username, String password)
           
 
Method Summary
 void close()
           
static boolean equals(DatasourceConnection left, DatasourceConnection right)
           
 boolean equals(Object obj)
           
 Connection getConnection()
           
 DataSource getDatasource()
           
 String getPassword()
           
 PreparedStatement getPreparedStatement(SQL sql, boolean createGeneratedKeys, boolean allowCaching)
           
 PreparedStatement getPreparedStatement(SQL sql, int resultSetType, int resultSetConcurrency)
           
 int getRequestId()
           
 int getTransactionIsolationLevel()
           
 String getUsername()
           
 boolean isTimeout()
           
 void setRequestId(int requestId)
           
 boolean supportsGetGeneratedKeys()
           
 DatasourceConnection using()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatasourceConnectionImpl

public DatasourceConnectionImpl(Connection connection,
                                DataSource datasource,
                                String username,
                                String password)
Parameters:
connection -
datasource -
pass -
user -
Method Detail

getConnection

public Connection getConnection()
Specified by:
getConnection in interface DatasourceConnection
Returns:
Returns the connection.
See Also:
DatasourceConnection.getConnection()

getDatasource

public DataSource getDatasource()
Specified by:
getDatasource in interface DatasourceConnection
Returns:
Returns the datasource.
See Also:
DatasourceConnection.getDatasource()

isTimeout

public boolean isTimeout()
Specified by:
isTimeout in interface DatasourceConnection
Returns:
is timeout or not
See Also:
DatasourceConnection.isTimeout()

using

public DatasourceConnection using()

getPassword

public String getPassword()
Specified by:
getPassword in interface DatasourceConnection
Returns:
the password

getUsername

public String getUsername()
Specified by:
getUsername in interface DatasourceConnection
Returns:
the username

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

equals

public static boolean equals(DatasourceConnection left,
                             DatasourceConnection right)

getTransactionIsolationLevel

public int getTransactionIsolationLevel()
Returns:
the transactionIsolationLevel

getRequestId

public int getRequestId()

setRequestId

public void setRequestId(int requestId)

supportsGetGeneratedKeys

public boolean supportsGetGeneratedKeys()
Specified by:
supportsGetGeneratedKeys in interface DatasourceConnectionPro
See Also:
DatasourceConnectionPro.supportsGetGeneratedKeys()

getPreparedStatement

public PreparedStatement getPreparedStatement(SQL sql,
                                              boolean createGeneratedKeys,
                                              boolean allowCaching)
                                       throws SQLException
Specified by:
getPreparedStatement in interface DatasourceConnectionPro
Throws:
SQLException
See Also:
railo.runtime.db.DatasourceConnectionPro#getPreparedStatement(railo.runtime.db.SQL, boolean)

getPreparedStatement

public PreparedStatement getPreparedStatement(SQL sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws SQLException
Specified by:
getPreparedStatement in interface DatasourceConnectionPro
Throws:
SQLException
See Also:
railo.runtime.db.DatasourceConnectionPro#getPreparedStatement(railo.runtime.db.SQL, boolean)

close

public void close()
           throws SQLException
Specified by:
close in interface DatasourceConnectionPro
Throws:
SQLException
See Also:
DatasourceConnectionPro.close()


Copyright © 2012 Railo