railo.runtime.db
Class DatasourceConnectionImpl

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

public final class DatasourceConnectionImpl
extends Object
implements DatasourceConnection

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.

getDatasource

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

isTimeout

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

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

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 DatasourceConnection

getPreparedStatement

public PreparedStatement getPreparedStatement(SQL sql,
                                              boolean createGeneratedKeys,
                                              boolean allowCaching)
                                       throws SQLException
Specified by:
getPreparedStatement in interface DatasourceConnection
Throws:
SQLException

getPreparedStatement

public PreparedStatement getPreparedStatement(SQL sql,
                                              int resultSetType,
                                              int resultSetConcurrency)
                                       throws SQLException
Specified by:
getPreparedStatement in interface DatasourceConnection
Throws:
SQLException

close

public void close()
           throws SQLException
Specified by:
close in interface DatasourceConnection
Throws:
SQLException


Copyright © 2012 Railo