com.jpattern.orm.session.datasource
Class DataSourceConnection

java.lang.Object
  extended by com.jpattern.orm.session.datasource.DataSourceConnection
All Implemented Interfaces:
IConnection

public class DataSourceConnection
extends Object
implements IConnection


Constructor Summary
DataSourceConnection(DataSource dataSource, boolean readOnly)
           
 
Method Summary
 void addCaller(IConnectionCaller connectionCaller)
           
 void close(IConnectionCaller connectionCaller)
           
 void commit()
           
 IStatement createStatement()
           
 boolean isClosed()
           
 boolean isReadOnly()
           
 boolean isValid()
           
 PreparedStatement prepareStatement(String sql)
           
 PreparedStatement prepareStatement(String sql, String[] generatedColumnNames)
           
 void rollback()
           
 void setReadOnly(boolean readOnly)
           
 void setRollbackOnly()
           
 void setTransactionIsolation(int transactionIsolation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceConnection

public DataSourceConnection(DataSource dataSource,
                            boolean readOnly)
Method Detail

setTransactionIsolation

public void setTransactionIsolation(int transactionIsolation)
                             throws OrmException
Specified by:
setTransactionIsolation in interface IConnection
Throws:
OrmException

isClosed

public boolean isClosed()
                 throws OrmException
Specified by:
isClosed in interface IConnection
Throws:
OrmException

rollback

public void rollback()
              throws OrmException
Specified by:
rollback in interface IConnection
Throws:
OrmException

commit

public void commit()
            throws OrmException
Specified by:
commit in interface IConnection
Throws:
OrmException

prepareStatement

public PreparedStatement prepareStatement(String sql)
                                   throws OrmException
Specified by:
prepareStatement in interface IConnection
Throws:
OrmException

prepareStatement

public PreparedStatement prepareStatement(String sql,
                                          String[] generatedColumnNames)
                                   throws OrmException
Specified by:
prepareStatement in interface IConnection
Throws:
OrmException

createStatement

public IStatement createStatement()
                           throws OrmException
Specified by:
createStatement in interface IConnection
Throws:
OrmException

addCaller

public void addCaller(IConnectionCaller connectionCaller)
               throws OrmException
Specified by:
addCaller in interface IConnection
Throws:
OrmException

close

public void close(IConnectionCaller connectionCaller)
           throws OrmException
Specified by:
close in interface IConnection
Throws:
OrmException

setRollbackOnly

public void setRollbackOnly()
                     throws OrmException
Specified by:
setRollbackOnly in interface IConnection
Throws:
OrmException

setReadOnly

public void setReadOnly(boolean readOnly)
                 throws OrmException
Specified by:
setReadOnly in interface IConnection
Throws:
OrmException

isValid

public boolean isValid()
                throws OrmException
Specified by:
isValid in interface IConnection
Throws:
OrmException

isReadOnly

public boolean isReadOnly()


Copyright © 2013. All Rights Reserved.