aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java10
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java4
2 files changed, 5 insertions, 9 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
index f642cddc7..580038403 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
@@ -26,7 +26,6 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
-import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@@ -95,12 +94,11 @@ public class StatisticLogger implements IStatisticLogger{
@Override
- //TODO: update tests!!!!
public void internalTesting() throws Exception {
- Date expioredate = new Date(new Date().getTime() - 120);
- Query query = entityManager.createNamedQuery("getAllEntriesNotBeforeTimeStamp");
- query.setParameter("timeout", expioredate);
- List<StatisticLog> result = query.getResultList();
+ int testId = 1;
+ Query query = entityManager.createNamedQuery("getTestEntity");
+ query.setParameter("testid", testId);
+ query.getResultList();
}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java
index ba48f8caf..d98444c87 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java
@@ -34,15 +34,13 @@ import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
-import org.hibernate.annotations.DynamicUpdate;
-
@Entity
//@DynamicUpdate(value=true)
@Table(name = "statisticlog")
@NamedQueries({
- @NamedQuery(name="getAllEntriesNotBeforeTimeStamp", query = "select statisiclog from StatisticLog statisiclog where statisiclog.timestamp > :timeout")
+ @NamedQuery(name="getTestEntity", query = "select statisiclog from StatisticLog statisiclog where statisiclog.id = :testid")
})
public class StatisticLog implements Serializable{