From 20eb1a935d2ffec8e13d7755cf23653645aee0f9 Mon Sep 17 00:00:00 2001 From: Curt Lockhart Date: Wed, 25 May 2016 18:07:11 -0600 Subject: [PATCH 1/2] Added AbstractQuery.getDao() Used to check if the dao database isn't already closed to validate a saved query object. --- .../src/main/java/de/greenrobot/dao/query/AbstractQuery.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DaoCore/src/main/java/de/greenrobot/dao/query/AbstractQuery.java b/DaoCore/src/main/java/de/greenrobot/dao/query/AbstractQuery.java index 3d5c27e88..94401ae81 100644 --- a/DaoCore/src/main/java/de/greenrobot/dao/query/AbstractQuery.java +++ b/DaoCore/src/main/java/de/greenrobot/dao/query/AbstractQuery.java @@ -83,4 +83,7 @@ protected void checkThread() { } } + public AbstractDao getDao() { + return dao; + } } From 56754c4a455c64b901bd725e8db50aa53239231f Mon Sep 17 00:00:00 2001 From: Curt Lockhart Date: Thu, 4 Aug 2016 09:02:18 -0600 Subject: [PATCH 2/2] Added AbstractQuery.getSession() Used to check if the dao database isn't already closed to validate a saved query object. --- .../java/org/greenrobot/greendao/query/AbstractQuery.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java b/DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java index 7326709f4..fffb8917e 100644 --- a/DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java +++ b/DaoCore/src/main/java/org/greenrobot/greendao/query/AbstractQuery.java @@ -16,6 +16,7 @@ package org.greenrobot.greendao.query; import org.greenrobot.greendao.AbstractDao; +import org.greenrobot.greendao.AbstractDaoSession; import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.InternalQueryDaoAccess; @@ -83,7 +84,7 @@ protected void checkThread() { } } - public AbstractDao getDao() { - return dao; - } + public AbstractDaoSession getSession() { + return dao.getSession(); + } }