|
package com.awsle.aibatis.client;
|
|
import java.util.List;
|
|
import android.content.Context;
|
import android.database.sqlite.SQLiteDatabase;
|
|
import com.awsle.aibatis.client.SqlMapClientImpl.DbUpdateListener;
|
import com.awsle.aibatis.exception.IdNotFoundException;
|
|
/**
|
*
|
* @author 席有芳
|
* @url http://code.awsle.com/index.php/p/aibatis/
|
* @mail 951868171@qq.com
|
* @version 1.0
|
* @since aibatis-Alpha1.0.zip
|
*/
|
public interface SqlMapClient {
|
//android上下文
|
SqlMapClient init(Context context);
|
//初始化
|
SqlMapClient init(Context context,DbUpdateListener dbUpdateListener);
|
//查询到对象
|
Object queryForObject(String id, Object parameterObject) throws IdNotFoundException;
|
//查询到List
|
List queryForList(String id, Object parameterObject) throws IdNotFoundException;
|
//查询到对象
|
Object queryForObject(String id) throws IdNotFoundException;
|
//查询到List
|
List queryForList(String id) throws IdNotFoundException;
|
//更新操作
|
int update(String id, Object parameterObject) throws IdNotFoundException;
|
//更新操作
|
int delete(String id, Object parameterObject) throws IdNotFoundException;
|
//插入操作
|
int insert(String id, Object parameterObject) throws IdNotFoundException;
|
//更新操作
|
int update(String id) throws IdNotFoundException;
|
//更新操作
|
int delete(String id) throws IdNotFoundException;
|
int insert(String id) throws IdNotFoundException;
|
//开始事务
|
void beginTransaction();
|
//结束事务
|
void endTransaction();
|
//获取到数据库句柄
|
SQLiteDatabase getDb();
|
}
|