AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | Private 属性 | 所有成员列表
com.ab.db.orm.AbSDSQLiteOpenHelper类 参考abstract
类 com.ab.db.orm.AbSDSQLiteOpenHelper 继承关系图:
com.ab.db.orm.AbSDDBHelper

Public 成员函数

 AbSDSQLiteOpenHelper (Context context, String dir, String name, CursorFactory factory, int version)
 
synchronized SQLiteDatabase getWritableDatabase ()
 
synchronized SQLiteDatabase getReadableDatabase ()
 
void onOpen (SQLiteDatabase db)
 
synchronized void close ()
 
abstract void onCreate (SQLiteDatabase db)
 
abstract void onUpgrade (SQLiteDatabase db, int oldVersion, int newVersion)
 

Private 属性

final Context mContext
 
final String mName
 
final String mDir
 
final SQLiteDatabase.CursorFactory mFactory
 
final int mNewVersion
 
SQLiteDatabase mDatabase = null
 
boolean mIsInitializing = false
 

详细描述

© 2012 amsoft.cn 名称:AbSDSQLiteOpenHelper.java 描述:SD卡中保存数据库

作者
还如一梦中
版本
v1.0
日期
:2013-7-23 上午9:47:10

构造及析构函数说明

com.ab.db.orm.AbSDSQLiteOpenHelper.AbSDSQLiteOpenHelper ( Context  context,
String  dir,
String  name,
CursorFactory  factory,
int  version 
)
inline

初始化一个AbSDSQLiteOpenHelper对象.

参数
context应用Context
path要放到SDCard下的文件夹路径
name数据库名
factory数据库查询的游标工厂
version数据库的新版本号

成员函数说明

synchronized void com.ab.db.orm.AbSDSQLiteOpenHelper.close ( )
inline

数据库被关闭.

synchronized SQLiteDatabase com.ab.db.orm.AbSDSQLiteOpenHelper.getReadableDatabase ( )
inline

获取可读权限的数据库对象..

返回
数据库对象
synchronized SQLiteDatabase com.ab.db.orm.AbSDSQLiteOpenHelper.getWritableDatabase ( )
inline

获取可写权限的数据库对象.

返回
数据库对象
abstract void com.ab.db.orm.AbSDSQLiteOpenHelper.onCreate ( SQLiteDatabase  db)
abstract

数据库被创建事件.

参数
db被创建的数据库
void com.ab.db.orm.AbSDSQLiteOpenHelper.onOpen ( SQLiteDatabase  db)
inline

数据库被打开.

参数
db被打开的数据库
abstract void com.ab.db.orm.AbSDSQLiteOpenHelper.onUpgrade ( SQLiteDatabase  db,
int  oldVersion,
int  newVersion 
)
abstract

数据库被重建.

参数
db被创建的数据库
oldVersion原来的数据库版本
newVersion新的数据库版本

类成员变量说明

final Context com.ab.db.orm.AbSDSQLiteOpenHelper.mContext
private

应用Context.

SQLiteDatabase com.ab.db.orm.AbSDSQLiteOpenHelper.mDatabase = null
private

数据库对象.

final String com.ab.db.orm.AbSDSQLiteOpenHelper.mDir
private

数据库文件保存文件夹全路径.

final SQLiteDatabase.CursorFactory com.ab.db.orm.AbSDSQLiteOpenHelper.mFactory
private

数据库查询的游标工厂.

boolean com.ab.db.orm.AbSDSQLiteOpenHelper.mIsInitializing = false
private

是否已经初始化过.

final String com.ab.db.orm.AbSDSQLiteOpenHelper.mName
private

数据库名.

final int com.ab.db.orm.AbSDSQLiteOpenHelper.mNewVersion
private

数据库的新版本号.


该类的文档由以下文件生成: