当前位置: 首页>>代码示例>>Java>>正文


Java CursorFactory类代码示例

本文整理汇总了Java中android.database.sqlite.SQLiteDatabase.CursorFactory的典型用法代码示例。如果您正苦于以下问题:Java CursorFactory类的具体用法?Java CursorFactory怎么用?Java CursorFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CursorFactory类属于android.database.sqlite.SQLiteDatabase包,在下文中一共展示了CursorFactory类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SQLiteAssetHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
/**
 * Create a helper object to create, open, and/or manage a database in
 * a specified location.
 * This method always returns very quickly.  The database is not actually
 * created or opened until one of {@link #getWritableDatabase} or
 * {@link #getReadableDatabase} is called.
 *
 * @param context to use to open or create the database
 * @param name of the database file
 * @param storageDirectory to store the database file upon creation; caller must
 * ensure that the specified absolute path is available and can be written to
 * @param factory to use for creating cursor objects, or null for the default
 * @param version number of the database (starting at 1); if the database is older,
 * SQL file(s) contained within the application assets folder will be used to
 * upgrade the database
 */
public SQLiteAssetHelper(Context context, String name, String storageDirectory, CursorFactory factory, int version, DatabaseErrorHandler errorHandler) {
    super(context, name, factory, version, errorHandler);

    if (version < 1) throw new IllegalArgumentException("Version must be >= 1, was " + version);
    if (name == null) throw new IllegalArgumentException("Database name cannot be null");

    mContext = context;
    mName = name;
    mFactory = factory;
    mNewVersion = version;

    mAssetPath = ASSET_DB_PATH + "/" + name;
    if (storageDirectory != null) {
        mDatabasePath = storageDirectory;
    } else {
        mDatabasePath = context.getApplicationInfo().dataDir + "/databases";
    }
    mUpgradePathFormat = ASSET_DB_PATH + "/" + name + "_upgrade_%s-%s.sql";
}
 
开发者ID:albertogiunta,项目名称:justintrain-client-android,代码行数:36,代码来源:SQLiteAssetHelper.java

示例2: DeleteOnDowngradeSQLiteOpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DeleteOnDowngradeSQLiteOpenHelper(Context context, String name, CursorFactory factory, int version) {
    super(context, name, factory, version);
    mDatabaseFile = context.getDatabasePath(name);
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:5,代码来源:DeleteOnDowngradeSQLiteOpenHelper.java

示例3: createdb

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public void createdb(View v) {
	CursorFactory factory = null;
	int version = 1;// �Զ�����1��ʼ
	String name = "db.db";// ���ݿ���
	Context Context = v.getContext();
	// ʹ��sqlliteopenhelpeʵ������ȡһ��sqldatabase
	SQLiteOpenHelper helper = new MySQLiteOpenHelper(Context, name,
			factory, version);
	SQLiteDatabase db = helper.getWritableDatabase();

}
 
开发者ID:z9961,项目名称:DoList,代码行数:12,代码来源:CreateDBActivity.java

示例4: OpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public OpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory, SCHEMA_VERSION);
}
 
开发者ID:xiarunhao123,项目名称:Ency,代码行数:4,代码来源:DaoMaster.java

示例5: DevOpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
    mContext = context;
}
 
开发者ID:zqHero,项目名称:rongyunDemo,代码行数:5,代码来源:DaoMaster.java

示例6: DevOpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:4,代码来源:DaoMaster.java

示例7: RobustSQLiteOpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public RobustSQLiteOpenHelper(Context context, String name,
		CursorFactory factory, int version) {
	super(context, name, factory, version);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:RobustSQLiteOpenHelper.java

示例8: DBHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DBHelper(Context context, String name, CursorFactory factory, int version) {
	super(context, name, factory, version);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:DBHelper.java

示例9: DatabaseOpenHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DatabaseOpenHelper(Context context, String name, CursorFactory factory, int version) {
    super(context, name, factory, version);
    this.context = context;
    this.name = name;
    this.version = version;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:7,代码来源:DatabaseOpenHelper.java

示例10: Database

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public Database(Context context, String name, CursorFactory factory, int version)
{
	super(context, name, factory, version);
}
 
开发者ID:vassela,项目名称:AC2RD,代码行数:5,代码来源:DatabaseProvider.java

示例11: DbHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DbHelper(Context context, String name, CursorFactory factory, int version) {
    super(context, name, factory, version);
}
 
开发者ID:facetome,项目名称:smart_plan,代码行数:4,代码来源:DbHelperManger.java

示例12: DBHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DBHelper(Context context, String name, CursorFactory factory, int version) {
    //必须通过super 调用父类的构造函数
    super(context, name, factory, version);
}
 
开发者ID:MarukoZ,项目名称:FaceRecognition,代码行数:5,代码来源:DBHelper.java

示例13: openOrCreateDatabase

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
@Override
public SQLiteDatabase openOrCreateDatabase(
        String name, int mode, CursorFactory factory, DatabaseErrorHandler errorHandler) {
    return super.openOrCreateDatabase(
            name, mode | Context.MODE_NO_LOCALIZED_COLLATORS, factory, errorHandler);
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:7,代码来源:NoLocaleSqliteContext.java

示例14: DatabaseHelper

import android.database.sqlite.SQLiteDatabase.CursorFactory; //导入依赖的package包/类
public DatabaseHelper(Context context, String name, CursorFactory factory, int version) {
  super(context, name, factory, version);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:4,代码来源:DatabaseFactory.java


注:本文中的android.database.sqlite.SQLiteDatabase.CursorFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。