aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:54:17 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:54:17 +0200
commit317f83216d4429612f8038c8fc7d875cd5dabc75 (patch)
treea8f0a3d4f036fb8aa37d855d68b43cb484b9d2a8 /id/server/moa-id-commons/src/main/java/at
parent328f850d0b5775bc8aed8f5ced1a6ef6269cb831 (diff)
parentc80c2df4bc7fd6cc87156e1d38f5cc4a76d1ac1a (diff)
downloadmoa-id-spss-317f83216d4429612f8038c8fc7d875cd5dabc75.tar.gz
moa-id-spss-317f83216d4429612f8038c8fc7d875cd5dabc75.tar.bz2
moa-id-spss-317f83216d4429612f8038c8fc7d875cd5dabc75.zip
Merge branch 'moa2_0_tlenz' of https://gitlab.iaik.tugraz.at/afitzek/moa-idspss into moa2_0_tlenz
Diffstat (limited to 'id/server/moa-id-commons/src/main/java/at')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
index 67bc2b918..08cb32625 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -21,6 +21,7 @@ public class ConfigurationDBRead {
QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix like SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
+ QUERIES.put("getAllActiveOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '1'");
QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id"); }
@@ -132,6 +133,24 @@ public class ConfigurationDBRead {
return result;
}
+ public static List<OnlineApplication> getAllActiveOnlineApplications() {
+ Logger.trace("Get All active OnlineApplications from database.");
+
+ List<OnlineApplication> result;
+ EntityManager session = ConfigurationDBUtils.getCurrentSession();
+
+ javax.persistence.Query query = session.createQuery(QUERIES.get("getAllActiveOnlineApplications"));
+ result = query.getResultList();
+
+ Logger.trace("Found entries: " + result.size());
+
+ if (result.size() == 0) {
+ Logger.trace("No entries found.");
+ return null;
+ }
+ return result;
+ }
+
@SuppressWarnings("rawtypes")
public static List<OnlineApplication> searchOnlineApplications(String id) {
MiscUtil.assertNotNull(id, "OnlineApplictionID");