use of nl.qbusict.cupboard.DatabaseCompartment in project philm by chrisbanes.
the class PhilmSQLiteOpenHelper method delete.
@Override
public void delete(Collection<PhilmMovie> movies) {
assetNotClosed();
SQLiteDatabase db = null;
try {
db = getWritableDatabase();
db.beginTransaction();
final DatabaseCompartment dbc = cupboard().withDatabase(db);
for (PhilmMovie movie : movies) {
dbc.delete(movie);
}
db.setTransactionSuccessful();
} catch (Exception e) {
// Crashlytics.logException(e);
} finally {
if (db != null) {
db.endTransaction();
}
}
}
Aggregations