Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DataAccessObject {
- protected DataBaseSQLiteAdapter dbHelper;
- protected SQLiteDatabase database; // or db if you want
- public DataAccessObject(Context context) {
- dbHelper = new DataBaseSQLiteAdapter(context);
- }
- /**
- * Initializes the database of this data access object so it may be ready for queries
- */
- public void open() {
- database = dbHelper.getWritableDatabase();
- }
- public void close() {
- database.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement