📄 dboperatei.java
字号:
package llm.pool.relation;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import javax.sql.DataSource;
public interface DBOperateI {
/**
* 初始化数据库操作
* @param jndiName
* @throws LlmDBException
*/
public void initialize( String jndiName ) throws LlmDBException;
/**
* 初始化数据库操作
* @param jndiName
* @throws LlmDBException
*/
public void init( String jndiName ) throws LlmDBException;
/**
* 获取数据源
* @return
*/
public DataSource getDataSource();
/**
* 得到数据库配置参数
* @return
*/
public DBConnectPara getDBConnectPara();
/**
* 获取数据库连接
* @return 当前数据的连接
* @throws LlmDBException
* @throws SQLException
*/
public Connection getDBConnection() throws SQLException, LlmDBException;
/**
* 释放连接回连接池中
*/
public void freeConnection();
/**
* 执行数据库查询,速度快
* @param query 查询语句
* @return 检索的结果集
* @throws LlmDBException
* @throws SQLException
*/
public ArrayList exeQuery( String query ) throws SQLException, LlmDBException;
/**
* 查询返回一个整数
* @param query
* @return
* @throws LlmDBException
* @throws SQLException
*/
public int exeQueryInt( String query ) throws SQLException, LlmDBException;
/**
* 分页显示时取得当前页的记录集,速度较慢
* @param query 查询语句
* @param beginRow 开始行
* @param endRow 结束行
* @return 检索的结果集
* @throws LlmDBException
* @throws SQLException
*/
public ArrayList exeQuery( String query, int beginRow, int endRow ) throws SQLException, LlmDBException;
/**
* 执行数据库更新或插入操作
* @param query
* @return 执行是否成功
* @throws LlmDBException
* @throws SQLException
*/
public boolean exeUpdate(String query);
/**
* 执行数据库更新或插入操作
* @param arrayListSql
* @return 执行是否成功
* @throws LlmDBException
*/
public boolean exeUpdate( ArrayList arrayListSql );
/**
* 执行数据库更新或插入操作
* @param vSql
* @return 执行是否成功
* @throws LlmDBException
*/
public boolean exeUpdate( String[] SqlArray );
/**
* 执行存储过程例子
* @param strSql
* @return 执行是否成功
* @throws LlmDBException
* @throws SQLException
*/
public String exeProc(String strSql) throws SQLException, LlmDBException;
/**
* 返回结果集的总行数
* @return 总行数
*/
public int getQueryTotalRow();
/**
* 得到从数据库中取得的结果,目前没有使用
* @return 检索的结果集
*/
public ArrayList getResultArrayList();
/**
* 得到系统返回的信息
* @return 信息
*/
public String getMessage();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -