?? 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 + -