use of org.adw.launcher2.LauncherProvider.SqlArguments in project ADWLauncher2 by boombuler.
the class AppDBProvider method insert.
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
SqlArguments args = new SqlArguments(uri);
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
final long rowId = db.insert(args.table, null, initialValues);
if (rowId <= 0)
return null;
return ContentUris.withAppendedId(uri, rowId);
}
use of org.adw.launcher2.LauncherProvider.SqlArguments in project ADWLauncher2 by boombuler.
the class AppDBProvider method update.
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
SqlArguments args = new SqlArguments(uri, selection, selectionArgs);
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
return db.update(args.table, values, args.where, args.args);
}
use of org.adw.launcher2.LauncherProvider.SqlArguments in project ADWLauncher2 by boombuler.
the class AppDBProvider method delete.
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
SqlArguments args = new SqlArguments(uri, selection, selectionArgs);
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
return db.delete(args.table, args.where, args.args);
}
use of org.adw.launcher2.LauncherProvider.SqlArguments in project ADWLauncher2 by boombuler.
the class AppDBProvider method bulkInsert.
@Override
public int bulkInsert(Uri uri, ContentValues[] values) {
SqlArguments args = new SqlArguments(uri);
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
try {
db.beginTransaction();
DoBulkInsert(db, args.table, values);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
db.close();
}
return values.length;
}
Aggregations