Java Code Examples for android.database.sqlite.SQLiteDatabase.CursorFactory

The following examples show how to use android.database.sqlite.SQLiteDatabase.CursorFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    checkMode(mode);
    File f = getDatabasePath(name);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    if ((mode & MODE_NO_LOCALIZED_COLLATORS) != 0) {
        flags |= SQLiteDatabase.NO_LOCALIZED_COLLATORS;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 2
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    checkMode(mode);
    File f = getDatabasePath(name);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    if ((mode & MODE_NO_LOCALIZED_COLLATORS) != 0) {
        flags |= SQLiteDatabase.NO_LOCALIZED_COLLATORS;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 3
Source Project: android_9.0.0_r45   Source File: ContextImpl.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    checkMode(mode);
    File f = getDatabasePath(name);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    if ((mode & MODE_NO_LOCALIZED_COLLATORS) != 0) {
        flags |= SQLiteDatabase.NO_LOCALIZED_COLLATORS;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 4
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 5
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(f.getPath(), factory, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 6
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 7
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 8
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 9
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 10
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
        DatabaseErrorHandler errorHandler) {
    File f = validateFilePath(name, true);
    int flags = SQLiteDatabase.CREATE_IF_NECESSARY;
    if ((mode & MODE_ENABLE_WRITE_AHEAD_LOGGING) != 0) {
        flags |= SQLiteDatabase.ENABLE_WRITE_AHEAD_LOGGING;
    }
    SQLiteDatabase db = SQLiteDatabase.openDatabase(f.getPath(), factory, flags, errorHandler);
    setFilePermissionsFromMode(f.getPath(), mode, 0);
    return db;
}
 
Example 11
Source Project: Neptune   Source File: CustomContextWrapper.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    File databaseDir = new File(getPluginPackageInfo().getDataDir() + DATABASE_PATH);
    if (!databaseDir.exists()) {
        databaseDir.mkdirs();
    }
    // backup database for old version start
    checkBackupDB(name);
    // backup database for old version end
    return super.openOrCreateDatabase(databaseDir.getAbsolutePath() + "/" + name, mode, factory);
}
 
Example 12
Source Project: FimiX8-RE   Source File: DaoMaster.java    License: MIT License 4 votes vote down vote up
public OpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory, 1);
}
 
Example 13
Source Project: FimiX8-RE   Source File: DaoMaster.java    License: MIT License 4 votes vote down vote up
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
Example 14
Source Project: SoloPi   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public OpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory, SCHEMA_VERSION);
}
 
Example 15
Source Project: ClassSchedule   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
Example 16
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 17
Source Project: financisto   Source File: DatabaseHelper.java    License: GNU General Public License v2.0 4 votes vote down vote up
public DatabaseHelper(Context context, String name, CursorFactory factory, int version) {
	super(context, name, factory, version);
	// TODO Auto-generated constructor stub
}
 
Example 18
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 19
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 20
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 21
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 22
Source Project: Android-Architecture   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
Example 23
Source Project: OpenHub   Source File: DaoMaster.java    License: GNU General Public License v3.0 4 votes vote down vote up
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
Example 24
Source Project: Mobike   Source File: DBHelper.java    License: Apache License 2.0 4 votes vote down vote up
public DBHelper(Context context, String name, CursorFactory factory, int version) {
	super(context, name, factory, version);
}
 
Example 25
Source Project: Android-IM   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public DevOpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory);
}
 
Example 26
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 27
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 28
Source Project: Android-Architecture   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public OpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory, SCHEMA_VERSION);
}
 
Example 29
Source Project: AndroidComponentPlugin   Source File: ContextImpl.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
    return openOrCreateDatabase(name, mode, factory, null);
}
 
Example 30
Source Project: Android-IM   Source File: DaoMaster.java    License: Apache License 2.0 4 votes vote down vote up
public OpenHelper(Context context, String name, CursorFactory factory) {
    super(context, name, factory, SCHEMA_VERSION);
}