cn.sylinx.hbatis.ds.JdbcBlock Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbatis-core Show documentation
Show all versions of hbatis-core Show documentation
hbatis is a simple orm framework
The newest version!
package cn.sylinx.hbatis.ds;
import java.sql.Connection;
import java.sql.SQLException;
import cn.sylinx.hbatis.exception.BlockException;
/**
* JDBC执行块
*
* @author han
*
* @param
* O
*/
public abstract class JdbcBlock implements ResourceBlock {
@Override
public O apply(Connection resource) throws BlockException {
try {
return applyBlock(resource);
} catch (Throwable e) {
throw new BlockException(e);
}
}
/**
* 执行快
*
* @param resource
* Connection对象
* @return O
* @throws Exception
* Exception
*/
public abstract O applyBlock(Connection resource) throws SQLException;
}