code: public void consumeDatabase(DbConsumer dbConsumer) {
  		SQLiteDatabase db = getDatabaseConnection();
  		try {
  			dbConsumer.consume(db);
  		} finally {
  			reduceDatabaseConnection();
  		}
  	}
docs: Execute an action on the database. The opening and closing of the database connection is handled for you.
  
  @param dbConsumer Action you want to execute on the database