デフォルトでは、bulkInsert,applyBatch共にアトミック性は保証されていません。
詳細:http://yuki312.blogspot.jp/2012/07/androidbulkinsertapplybatch.html
bulkInsert
public int bulkInsert(Uri uri, ContentValues[] values) {
SQLiteDatabase db = MyDataBase.getInstance(getContext())
.getWritableDatabase();
db.beginTransaction();
try {
SQLiteStatement insertStmt = db
.compileStatement("INSERT INTO test "
+ "(name) VALUES (?);");
for (ContentValues value : values) {
insertStmt.bindString(1, value.getAsString("name"));
insertStmt.executeInsert();
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
...
applyBatch
@Override
public ContentProviderResult[] applyBatch(
ArrayList<ContentProviderOperation> operations)
throws OperationApplicationException {
SQLiteDatabase db = MyDataBase.getInstance(getContext())
.getWritableDatabase();
db.beginTransaction();
try {
ContentProviderResult[] result = super.applyBatch(operations);
db.setTransactionSuccessful();
return result;
} finally {
db.endTransaction();
}
}