Code example for SQLiteDatabase

Methods: beginTransactionendTransactionsetTransactionSuccessful

0
public class DBUtils { 
 
	private static final String LOG_TAG = "DBUtils";
 
	public static <T> void executeInTransaction(final SQLiteDatabase db, final Runnable runnable) {
		db.beginTransaction();
		try { 
			runnable.run();
			db.setTransactionSuccessful();
		} 
		catch (final Exception e) {
			logError(e);
		} 
		finally { 
			db.endTransaction();
		} 
	} 
 
	@SuppressWarnings("unchecked") 
	public static <T> T executeInSafety(final Callable<?> callable) {
Connect your IDE to all the code out there  Get Codota for Java