online.sanen.unabo.template.transaction.JdbcTransactionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unabo Show documentation
Show all versions of unabo Show documentation
Unabo, the Java™ progressive ORM framework
The newest version!
package online.sanen.unabo.template.transaction;
import java.sql.Connection;
import javax.sql.DataSource;
import com.mhdt.degist.Properties;
/**
*
*
* @author LazyToShow
* Date: Nov 3, 2018
* Time: 10:48:36 AM
*/
public class JdbcTransactionFactory implements TransactionFactory {
@Override
public void setProperties(Properties props) {
}
public Transaction newTransaction(Connection conn) {
return new JdbcTransaction(conn);
}
@Override
public Transaction newTransaction(DataSource ds, TransactionIsolationLevel level, boolean autoCommit) {
if (autoCommit)
return null;
return new JdbcTransaction(ds, level, autoCommit);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy