Commits

Anonymous committed 379c9db

Upgraded hibernate, testcase currently fails though.

Comments (0)

Files changed (5)

lib/optional/cglib-1.0.jar

Binary file removed.

lib/optional/cglib2.jar

Binary file added.

lib/optional/hibernate-2.0.3.jar

Binary file removed.

lib/optional/hibernate-2.1.1.jar

Binary file added.

src/java/com/opensymphony/workflow/spi/hibernate/HibernateWorkflowStore.java

 import net.sf.hibernate.Session;
 import net.sf.hibernate.SessionFactory;
 import net.sf.hibernate.Transaction;
+import net.sf.hibernate.expression.Criterion;
 import net.sf.hibernate.expression.Expression;
 
 import org.apache.commons.logging.Log;
  * See the HibernateFunctionalWorkflowTestCase for more help.
  *
  * @author $Author: hani $
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
  */
 public class HibernateWorkflowStore implements WorkflowStore {
     //~ Static fields/initializers /////////////////////////////////////////////
     public List query(WorkflowExpressionQuery query) throws StoreException {
         com.opensymphony.workflow.query.Expression expression = query.getExpression();
 
-        Expression expr;
+        Criterion expr;
 
         Class entityClass = getQueryClass(expression, null);
 
         }
 
         Criteria criteria = session.createCriteria(entityClass);
-        Expression expression = buildExpression(query);
+        Criterion expression = buildExpression(query);
         criteria.add(expression);
 
         //get results and send them back
     /**
      * Returns an expression generated from this query
      */
-    private Expression getExpression(WorkflowQuery query) {
+    private Criterion getExpression(WorkflowQuery query) {
         int operator = query.getOperator();
 
         switch (operator) {
     /**
      *  Recursive method for building Expressions using Query objects.
      */
-    private Expression buildExpression(WorkflowQuery query) throws StoreException {
+    private Criterion buildExpression(WorkflowQuery query) throws StoreException {
         if (query.getLeft() == null) {
             if (query.getRight() == null) {
                 return getExpression(query); //leaf node
         }
     }
 
-    private Expression buildNested(NestedExpression nestedExpression) throws StoreException {
-        Expression full = null;
+    private Criterion buildNested(NestedExpression nestedExpression) throws StoreException {
+        Criterion full = null;
 
         for (int i = 0; i < nestedExpression.getExpressionCount(); i++) {
-            Expression expr;
+            Criterion expr;
             com.opensymphony.workflow.query.Expression expression = nestedExpression.getExpression(i);
 
             if (expression.isNested()) {
         return full;
     }
 
-    private Expression queryComparison(FieldExpression expression) {
+    private Criterion queryComparison(FieldExpression expression) {
         int operator = expression.getOperator();
 
         switch (operator) {