panda.dao.sql.executor.DynamicSqlManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.dao.sql.executor;
import java.sql.Connection;
import panda.dao.sql.SqlExecutor;
/**
*/
public class DynamicSqlManager extends SimpleSqlManager {
/**
* Constructor
*
* @param connection connection
* @param resultSetType one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY,
* ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
* @param resultSetConcurrency one of the following ResultSet constants:
* ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
* @param resultSetHoldability one of the following ResultSet constants:
* ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
*/
@Override
public SqlExecutor getExecutor(Connection connection, int resultSetType, int resultSetConcurrency,
int resultSetHoldability) {
DynamicSqlExecutor se = new DynamicSqlExecutor(this);
se.setConnection(connection);
se.setResultSetType(resultSetType);
se.setResultSetConcurrency(resultSetConcurrency);
se.setResultSetHoldability(resultSetHoldability);
return se;
}
}