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

27 lines
701 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();
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;
SQLiteDatabase getWritableDatabase();
DaoSession getDaoSession();
}