use of com.hippo.ehviewer.dao.DownloadDirnameDao in project EhViewer by seven332.
the class EhDB method getDownloadDirname.
@Nullable
public static synchronized String getDownloadDirname(long gid) {
DownloadDirnameDao dao = sDaoSession.getDownloadDirnameDao();
DownloadDirname raw = dao.load(gid);
if (raw != null) {
return raw.getDirname();
} else {
return null;
}
}
use of com.hippo.ehviewer.dao.DownloadDirnameDao in project EhViewer by seven332.
the class EhDB method removeDownloadDirname.
public static synchronized void removeDownloadDirname(long gid) {
DownloadDirnameDao dao = sDaoSession.getDownloadDirnameDao();
dao.deleteByKey(gid);
}
use of com.hippo.ehviewer.dao.DownloadDirnameDao in project EhViewer by seven332.
the class EhDB method clearDownloadDirname.
public static synchronized void clearDownloadDirname() {
DownloadDirnameDao dao = sDaoSession.getDownloadDirnameDao();
dao.deleteAll();
}
use of com.hippo.ehviewer.dao.DownloadDirnameDao in project EhViewer by seven332.
the class EhDB method putDownloadDirname.
/**
* Insert or update
*/
public static synchronized void putDownloadDirname(long gid, String dirname) {
DownloadDirnameDao dao = sDaoSession.getDownloadDirnameDao();
DownloadDirname raw = dao.load(gid);
if (raw != null) {
// Update
raw.setDirname(dirname);
dao.update(raw);
} else {
// Insert
raw = new DownloadDirname();
raw.setGid(gid);
raw.setDirname(dirname);
dao.insert(raw);
}
}
Aggregations