]>
git.argeo.org Git - gpl/argeo-slc.git/blob - TestResultDaoHibernate.java
4c55a5385f8cda62c29681d5b0de9935fc8e0501
1 package org
.argeo
.slc
.hibernate
.test
.tree
;
5 import org
.springframework
.orm
.hibernate3
.support
.HibernateDaoSupport
;
7 import org
.argeo
.slc
.core
.test
.NumericTRId
;
8 import org
.argeo
.slc
.core
.test
.TestResult
;
9 import org
.argeo
.slc
.core
.test
.TestResultId
;
10 import org
.argeo
.slc
.core
.test
.tree
.TreeTestResult
;
11 import org
.argeo
.slc
.dao
.test
.TestResultDao
;
14 * The Hibernate implementation for tree-based result of the test result dao.
18 public class TestResultDaoHibernate
extends HibernateDaoSupport
implements
21 public void create(TestResult testResult
) {
22 getHibernateTemplate().save(testResult
);
25 public void update(TestResult testResult
) {
26 getHibernateTemplate().saveOrUpdate(testResult
);
29 public TestResult
getTestResult(TestResultId id
) {
30 NumericTRId ntrid
= (NumericTRId
) id
;
31 List
<?
> list
= getHibernateTemplate().find(
32 "from TreeTestResult where numericResultId.value=?",
34 if (list
.size() == 0) {
37 return (TestResult
) list
.get(0);
42 public List
<TestResult
> listTestResults() {
43 return (List
<TestResult
>) getHibernateTemplate().find(
44 "from TreeTestResult");