xuxiuxi
2017-07-20 d018d0217f0afeb976bea7c739185cefe7267a9e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
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();
}