aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/java/at
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-08-06 16:03:19 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2013-08-06 16:03:19 +0200
commitc80c2df4bc7fd6cc87156e1d38f5cc4a76d1ac1a (patch)
tree187105dfbf07e7b5734179cdec4ec513c0c340da /id/server/moa-id-commons/src/main/java/at
parent845d7241c2556d36cfd91cdca8ddeb11f0395e6e (diff)
downloadmoa-id-spss-c80c2df4bc7fd6cc87156e1d38f5cc4a76d1ac1a.tar.gz
moa-id-spss-c80c2df4bc7fd6cc87156e1d38f5cc4a76d1ac1a.tar.bz2
moa-id-spss-c80c2df4bc7fd6cc87156e1d38f5cc4a76d1ac1a.zip
HTTP Metadata provider
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 e815f2a69..99c47e6d3 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.id = :id");
QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id");
@@ -134,6 +135,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");