Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBHandler.java

28 lines
712 B
Java
Raw Normal View History

package nodomain.freeyourgadget.gadgetbridge.database;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
public interface DBHandler extends AutoCloseable {
/**
* Closes the database.
*/
void closeDb();
2016-05-17 00:51:00 +02:00
void openDb();
SQLiteOpenHelper getHelper();
/**
* Releases the DB handler. No access may be performed after calling this method.
* Same as calling {@link GBApplication#releaseDB()}
*/
void close() throws Exception;
2016-05-17 00:51:00 +02:00
SQLiteDatabase getDatabase();
DaoSession getDaoSession();
}