Code example for SQLiteDatabase

Methods: beginTransactionWithListener

0
	 * @return Current {@link DatabaseAdapter} instance. 
	 */ 
	public DatabaseAdapter beginTransaction() { 
		open(); 
		 
		mDb.beginTransactionWithListener(TransactionListener.getFor(this));
		 
		return this;
	} 
	 
	/** 
	 * This method will set the current transaction as successful and end it 
	 * afterwards, thus committing all the data.  
	 * @return 
	 */ 
	public DatabaseAdapter commitTransaction() { 
		mDb.setTransactionSuccessful();
		mDb.endTransaction();
		 
		close();