mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-13 10:31:03 +01:00
28 lines
712 B
Java
28 lines
712 B
Java
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();
|
|
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;
|
|
|
|
SQLiteDatabase getDatabase();
|
|
|
|
DaoSession getDaoSession();
|
|
}
|