Index: csf-common-legacy/pom.xml
===================================================================
--- csf-common-legacy/pom.xml (revision 1410)
+++ csf-common-legacy/pom.xml (working copy)
@@ -242,7 +242,6 @@
javassist
javassist
3.12.1.GA
- test
org.objenesis
@@ -252,8 +251,8 @@
net.sf.ehcache
- ehcache
- 1.2.3
+ ehcache-core
+ 2.2.0
org.freemarker
@@ -262,8 +261,8 @@
org.hibernate
- hibernate
- 3.2.5.ga
+ hibernate-core
+ 3.6.10.Final
asm
Index: csf-common-legacy/src/main/java/edu/mit/common/dao/academic/hibernate/CourseOptionUserType.java
===================================================================
--- csf-common-legacy/src/main/java/edu/mit/common/dao/academic/hibernate/CourseOptionUserType.java (revision 1410)
+++ csf-common-legacy/src/main/java/edu/mit/common/dao/academic/hibernate/CourseOptionUserType.java (working copy)
@@ -11,7 +11,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;
import org.springframework.util.ObjectUtils;
@@ -63,7 +62,7 @@
*/
public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
throws HibernateException, SQLException {
- String code = (String) Hibernate.STRING.nullSafeGet(rs,names[0]);
+ String code = rs.getString(names[0]);
if (code == null || NULL_VALUE.equals(code) ) {
return "";
}
@@ -81,7 +80,7 @@
*/
public void nullSafeSet(PreparedStatement stmt, Object value, int index)
throws HibernateException, SQLException {
- Hibernate.STRING.nullSafeSet(stmt, ( value == null || value.equals("") ) ? NULL_VALUE : value, index);
+ stmt.setString(index, (value == null || value.equals("")) ? NULL_VALUE : (String) value);
}
/* (non-Javadoc)
Index: csf-common-legacy/src/main/java/edu/mit/common/dao/core/hibernate/enumeration/base/AbstractLabeledEnumUserType.java
===================================================================
--- csf-common-legacy/src/main/java/edu/mit/common/dao/core/hibernate/enumeration/base/AbstractLabeledEnumUserType.java (revision 1410)
+++ csf-common-legacy/src/main/java/edu/mit/common/dao/core/hibernate/enumeration/base/AbstractLabeledEnumUserType.java (working copy)
@@ -10,9 +10,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
-import org.hibernate.type.NullableType;
+import org.hibernate.type.AbstractSingleColumnStandardBasicType;
+import org.hibernate.type.StandardBasicTypes;
import org.hibernate.usertype.UserType;
import org.springframework.core.enums.LabeledEnum;
import org.springframework.core.enums.LabeledEnumResolver;
@@ -118,14 +118,14 @@
return object;
}
- protected NullableType persistentType() {
+ protected AbstractSingleColumnStandardBasicType persistentType() {
if (ShortCodedLabeledEnum.class.isAssignableFrom(returnedClass())) {
- return Hibernate.SHORT;
+ return StandardBasicTypes.SHORT;
} else if (LetterCodedLabeledEnum.class
.isAssignableFrom(returnedClass())) {
- return Hibernate.CHARACTER;
+ return StandardBasicTypes.CHARACTER;
} else {
- return Hibernate.STRING;
+ return StandardBasicTypes.STRING;
}
}
Index: csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationResponseDao.java
===================================================================
--- csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationResponseDao.java (revision 1410)
+++ csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationResponseDao.java (working copy)
@@ -132,7 +132,7 @@
query.setParameter("surveyId", surveyId);
query.setParameter("subjectGroup", evaluationSubjectGroup);
query.setParameter("studentId", new Long(studentId));
- query.setResultTransformer(new DistinctRootEntityResultTransformer());
+ query.setResultTransformer(DistinctRootEntityResultTransformer.INSTANCE);
return (EvaluationStudent) query.uniqueResult();
}
Index: csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationSubjectGroupDao.java
===================================================================
--- csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationSubjectGroupDao.java (revision 1410)
+++ csf-common-legacy/src/main/java/edu/mit/common/dao/survey/hibernate/HibernateEvaluationSubjectGroupDao.java (working copy)
@@ -113,7 +113,7 @@
String key = (String)keys.next();
query.setParameter(key,(String)queryParams.get(key));
}
- query.setResultTransformer(new DistinctRootEntityResultTransformer());
+ query.setResultTransformer(DistinctRootEntityResultTransformer.INSTANCE);
List list = query.list();
if(list.size() > 0) {
return (EvaluationSubjectGroup)list.get(0);
Index: csf-common-legacy/src/main/java/edu/mit/common/domain/student/NonSubjectAcademicCredit.java
===================================================================
--- csf-common-legacy/src/main/java/edu/mit/common/domain/student/NonSubjectAcademicCredit.java (revision 1410)
+++ csf-common-legacy/src/main/java/edu/mit/common/domain/student/NonSubjectAcademicCredit.java (working copy)
@@ -6,6 +6,7 @@
import java.util.Date;
import edu.mit.common.dao.student.NonSubjectAcademicCreditDao;
+import edu.mit.common.domain.AbstractDomainLongIdBase;
import edu.mit.common.domain.AbstractDomainStringIdBase;
import edu.mit.common.domain.core.enumeration.AIFlagType;
import edu.mit.common.domain.student.enumeration.NonSubjReqCodeType;
@@ -28,7 +29,7 @@
* $Id: NonSubjectAcademicCredit.java 1341 2009-12-31 02:00:23Z sabrown $
*
*/
-public class NonSubjectAcademicCredit extends AbstractDomainStringIdBase {
+public class NonSubjectAcademicCredit extends AbstractDomainLongIdBase {
private static final long serialVersionUID = 4969207191490250011L;
Index: csf-common-legacy/src/main/resources/applicationContext-csf-common.xml
===================================================================
--- csf-common-legacy/src/main/resources/applicationContext-csf-common.xml (revision 1410)
+++ csf-common-legacy/src/main/resources/applicationContext-csf-common.xml (working copy)
@@ -694,7 +694,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
true
Index: csf-common-legacy/src/main/resources/edu/mit/common/domain/student/hibernate/NonSubjectAcademicCredit.hbm.xml
===================================================================
--- csf-common-legacy/src/main/resources/edu/mit/common/domain/student/hibernate/NonSubjectAcademicCredit.hbm.xml (revision 1410)
+++ csf-common-legacy/src/main/resources/edu/mit/common/domain/student/hibernate/NonSubjectAcademicCredit.hbm.xml (working copy)
@@ -2,7 +2,7 @@
-
+
SFRST_REG_SEQ
Index: csf-common-legacy/src/test/java/edu/mit/common/dao/academic/hibernate/TestHibernateCourseDao.java
===================================================================
--- csf-common-legacy/src/test/java/edu/mit/common/dao/academic/hibernate/TestHibernateCourseDao.java (revision 1410)
+++ csf-common-legacy/src/test/java/edu/mit/common/dao/academic/hibernate/TestHibernateCourseDao.java (working copy)
@@ -31,15 +31,18 @@
private final Log logger = LogFactory.getLog(getClass());
@Test
- public void testGet() {
+ public void testGetNonEmptyOption() {
Course expected = new Course(new Department("16"),"1",CourseLevel.U);
Course actual = hibernateCourseDao.get(expected.getId());
assertEquals(expected, actual);
logger.info(actual);
logger.info(actual.getDepartment().getName());
-
- expected = new Course(new Department("4"),"",CourseLevel.U);
- actual = hibernateCourseDao.get(expected.getId());
+ }
+
+ @Test
+ public void testGetEmptyOption() {
+ Course expected = new Course(new Department("4"),"",CourseLevel.U);
+ Course actual = hibernateCourseDao.get(expected.getId());
assertEquals(expected, actual);
logger.info(actual);
logger.info(actual.getDepartment().getName());
@@ -70,7 +73,7 @@
}
@Test
- public void testFindByDepartment() {
+ public void testFindByDepartmentCode() {
final String departmentCode = "11";
List> results = hibernateCourseDao.findByDepartment(departmentCode);
assertTrue(!results.isEmpty());
@@ -79,8 +82,11 @@
logger.info(results.get(i));
assertTrue(((Course)results.get(i)).getDepartment().getId().trim().equals(departmentCode));
}
+ }
+
+ public void testFindByDepartment() {
final Department department = new Department("8");
- results = hibernateCourseDao.findByDepartment(department);
+ List> results = hibernateCourseDao.findByDepartment(department);
assertTrue(!results.isEmpty());
logger.info("Got "+results.size()+" results");
for ( int i = 0; i < results.size(); ++i ) {
Index: csf-common-legacy/src/test/java/edu/mit/common/dao/student/hibernate/TestHibernateNonSubjectAcademicCreditDao.java
===================================================================
--- csf-common-legacy/src/test/java/edu/mit/common/dao/student/hibernate/TestHibernateNonSubjectAcademicCreditDao.java (revision 1410)
+++ csf-common-legacy/src/test/java/edu/mit/common/dao/student/hibernate/TestHibernateNonSubjectAcademicCreditDao.java (working copy)
@@ -43,7 +43,7 @@
// =========================================================================
@Test
public void testGet() throws Exception {
- final String id = "21709867";
+ final Long id = 21709867l;
NonSubjectAcademicCredit result = (NonSubjectAcademicCredit) hibernateNonSubjectAcademicCreditDao.get(id);
logger.info("get returned "+result);
assertNotNull("failed assertion that result was not null",result);
@@ -52,7 +52,7 @@
@Test
public void testLoad() throws Exception {
- final String id = "21709867";
+ final Long id = 21709867l;
NonSubjectAcademicCredit result = (NonSubjectAcademicCredit) hibernateNonSubjectAcademicCreditDao.load(id);
logger.info("load returned "+result);
assertNotNull("failed assertion that result was not null",result);
@@ -143,10 +143,10 @@
@Test
public void testUpdate() {
- String hql = "select new java.lang.String (s.id) from NonSubjectAcademicCredit s " +
+ String hql = "select new java.lang.Long (s.id) from NonSubjectAcademicCredit s " +
"where s.reqAreaCode = 'PHYSED' and s.nonSubjReqCode = 'POINTS' and s.points != 4 " +
"and rownum < 2";
- String id = (String)daoFoundation.getCurrentSession().createQuery(hql).uniqueResult();
+ Long id = (Long)daoFoundation.getCurrentSession().createQuery(hql).uniqueResult();
NonSubjectAcademicCredit instance = hibernateNonSubjectAcademicCreditDao.load(id);
logger.info("loaded test "+instance);
instance.setPhysedPointsCredit(4);
Index: csf-common-legacy/src/test/resources/applicationContext-csf-common-test.xml
===================================================================
--- csf-common-legacy/src/test/resources/applicationContext-csf-common-test.xml (revision 1410)
+++ csf-common-legacy/src/test/resources/applicationContext-csf-common-test.xml (working copy)
@@ -109,8 +109,8 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
- true
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
+ true
Index: csf-common-legacy/src/test/resources/log4j.xml
===================================================================
--- csf-common-legacy/src/test/resources/log4j.xml (revision 1410)
+++ csf-common-legacy/src/test/resources/log4j.xml (working copy)
@@ -59,6 +59,10 @@
+
+
+
+
Index: csf-common-wtw-1.0-legacy/pom.xml
===================================================================
--- csf-common-wtw-1.0-legacy/pom.xml (revision 1449)
+++ csf-common-wtw-1.0-legacy/pom.xml (working copy)
@@ -209,19 +209,14 @@
test
- net.sf.ehcache
- ehcache
- 1.2.3
-
-
org.freemarker
freemarker
2.3.13
org.hibernate
- hibernate
- 3.2.5.ga
+ hibernate-core
+ 3.6.10.Final
asm
Index: csf-common-wtw-1.0-legacy/src/main/resources/applicationContext-common-wtw.xml
===================================================================
--- csf-common-wtw-1.0-legacy/src/main/resources/applicationContext-common-wtw.xml (revision 1449)
+++ csf-common-wtw-1.0-legacy/src/main/resources/applicationContext-common-wtw.xml (working copy)
@@ -200,7 +200,7 @@
false
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
true
true
Index: csf-rulengine/pom.xml
===================================================================
--- csf-rulengine/pom.xml (revision 1446)
+++ csf-rulengine/pom.xml (working copy)
@@ -59,12 +59,28 @@
org.hibernate
- hibernate
- 3.2.5.ga
+ hibernate-core
+ 3.6.10.Final
+
+ net.sf.ehcache
+ ehcache-core
+ 2.2.0
+
+
+ javassist
+ javassist
+ 3.12.1.GA
+
+ cglib
+ cglib
+ 2.2
+ test
+
+
junit
junit
4.10
@@ -86,14 +102,14 @@
asm
asm
jar
- 1.5.3
+ 3.1
-
+
UTF-8
Index: csf-rulengine/src/test/resources/applicationContext-csf-common-test.xml
===================================================================
--- csf-rulengine/src/test/resources/applicationContext-csf-common-test.xml (revision 1446)
+++ csf-rulengine/src/test/resources/applicationContext-csf-common-test.xml (working copy)
@@ -56,7 +56,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
true
Index: csf-security/pom.xml
===================================================================
--- csf-security/pom.xml (revision 1449)
+++ csf-security/pom.xml (working copy)
@@ -104,8 +104,8 @@
org.hibernate
- hibernate
- 3.2.5.ga
+ hibernate-core
+ 3.6.10.Final
asm
@@ -122,6 +122,11 @@
+ net.sf.ehcache
+ ehcache-core
+ 2.2.0
+
+
javax.servlet
servlet-api
2.5
Index: csf-security/src/test/resources/applicationContext-csf-security-acegi-test.xml
===================================================================
--- csf-security/src/test/resources/applicationContext-csf-security-acegi-test.xml (revision 1449)
+++ csf-security/src/test/resources/applicationContext-csf-security-acegi-test.xml (working copy)
@@ -48,7 +48,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
Index: csf-security/src/test/resources/applicationContext-csf-security-spring-test.xml
===================================================================
--- csf-security/src/test/resources/applicationContext-csf-security-spring-test.xml (revision 1449)
+++ csf-security/src/test/resources/applicationContext-csf-security-spring-test.xml (working copy)
@@ -55,7 +55,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
Index: csf-security/src/test/resources/applicationContext-csf-security-test.xml
===================================================================
--- csf-security/src/test/resources/applicationContext-csf-security-test.xml (revision 1449)
+++ csf-security/src/test/resources/applicationContext-csf-security-test.xml (working copy)
@@ -48,7 +48,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
+ net.sf.ehcache.hibernate.EhCacheRegionFactory
Index: csf-test/pom.xml
===================================================================
--- csf-test/pom.xml (revision 1410)
+++ csf-test/pom.xml (working copy)
@@ -70,8 +70,8 @@
org.hibernate
- hibernate
- 3.2.5.ga
+ hibernate-core
+ 3.6.10.Final
asm
Index: csf-workflow/src/test/resources/applicationContext-common-boilerplate.xml
===================================================================
--- csf-workflow/src/test/resources/applicationContext-common-boilerplate.xml (revision 1410)
+++ csf-workflow/src/test/resources/applicationContext-common-boilerplate.xml (working copy)
@@ -62,8 +62,7 @@
true
true
true
- org.hibernate.cache.EhCacheProvider
-
+ net.sf.ehcache.hibernate.EhCacheRegionFactory