se.unlogic.standardutils.dao
Class TransactionHandler
java.lang.Object
se.unlogic.standardutils.dao.TransactionHandler
public class TransactionHandler
- extends Object
TransactionHandler
public TransactionHandler(DataSource dataSource)
throws SQLException
- Throws:
SQLException
TransactionHandler
public TransactionHandler(Connection connection)
throws SQLException
- Throws:
SQLException
getUpdateQuery
public UpdateQuery getUpdateQuery(String sqlExpression)
throws SQLException
- Throws:
SQLException
getBooleanQuery
public BooleanQuery getBooleanQuery(String sql)
throws SQLException
- Throws:
SQLException
getObjectQuery
public <T> ObjectQuery<T> getObjectQuery(String sql,
BeanResultSetPopulator<T> populator)
throws SQLException
- Throws:
SQLException
getArrayListQuery
public <T> ArrayListQuery<T> getArrayListQuery(String sql,
BeanResultSetPopulator<T> populator)
throws SQLException
- Throws:
SQLException
getHashMapQuery
public <K,V> HashMapQuery<K,V> getHashMapQuery(String sql,
BeanResultSetPopulator<? extends Map.Entry<K,V>> populator)
throws SQLException
- Throws:
SQLException
commit
public void commit()
throws SQLException
- Throws:
SQLException
getQueryCount
public int getQueryCount()
abort
public void abort()
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
isClosed
public boolean isClosed()
autoClose
public static void autoClose(TransactionHandler transactionHandler)
isAborted
public boolean isAborted()
isCommited
public boolean isCommited()
Copyright © 2011. All Rights Reserved.