Commits

Anonymous committed 03d347f

Renamed to get rid of the New prefix

  • Participants
  • Parent commits d751e8c

Comments (0)

Files changed (5)

File src/java/com/opensymphony/workflow/spi/hibernate3/HibernateWorkflowStore.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.workflow.spi.hibernate3;
+
+import com.opensymphony.workflow.StoreException;
+import com.opensymphony.workflow.util.PropertySetDelegate;
+
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+
+import java.util.Map;
+
+
+/**
+ * @author masini
+ *
+ * New Refactored Hibernate Store.
+ * Look at @link NewHibernateFunctionalWorkflowTestCase for a use case.
+ */
+public class HibernateWorkflowStore extends AbstractHibernateWorkflowStore {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    Session session;
+
+    //~ Constructors ///////////////////////////////////////////////////////////
+
+    public HibernateWorkflowStore() {
+        super();
+    }
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    // Now session management is delegated to user
+    public void init(Map props) throws StoreException {
+        session = (Session) props.get("session");
+
+        setPropertySetDelegate((PropertySetDelegate) props.get("propertySetDelegate"));
+    }
+
+    protected Object execute(InternalCallback action) throws StoreException {
+        try {
+            return action.doInHibernate(session);
+        } catch (HibernateException e) {
+            throw new StoreException(e);
+        }
+    }
+}

File src/java/com/opensymphony/workflow/spi/hibernate3/NewHibernateWorkflowStore.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-package com.opensymphony.workflow.spi.hibernate3;
-
-import com.opensymphony.workflow.StoreException;
-import com.opensymphony.workflow.util.PropertySetDelegate;
-
-import org.hibernate.HibernateException;
-import org.hibernate.Session;
-
-import java.util.Map;
-
-
-/**
- * @author masini
- *
- * New Refactored Hibernate Store.
- * Look at @link NewHibernateFunctionalWorkflowTestCase for a use case.
- */
-public class NewHibernateWorkflowStore extends AbstractHibernateWorkflowStore {
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    Session session;
-
-    //~ Constructors ///////////////////////////////////////////////////////////
-
-    public NewHibernateWorkflowStore() {
-        super();
-    }
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    // Now session management is delegated to user
-    public void init(Map props) throws StoreException {
-        session = (Session) props.get("session");
-
-        setPropertySetDelegate((PropertySetDelegate) props.get("propertySetDelegate"));
-    }
-
-    protected Object execute(InternalCallback action) throws StoreException {
-        try {
-            return action.doInHibernate(session);
-        } catch (HibernateException e) {
-            throw new StoreException(e);
-        }
-    }
-}

File src/java/com/opensymphony/workflow/spi/hibernate3/NewSpringHibernateWorkflowStore.java

-/*
- * Copyright (c) 2002-2003 by OpenSymphony
- * All rights reserved.
- */
-package com.opensymphony.workflow.spi.hibernate3;
-
-import com.opensymphony.workflow.StoreException;
-
-import org.hibernate.HibernateException;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-
-import org.springframework.orm.hibernate3.HibernateCallback;
-import org.springframework.orm.hibernate3.HibernateTemplate;
-
-import java.sql.SQLException;
-
-import java.util.Map;
-
-
-/**
- * @author masini
- *
- * New Refactored Spring Managed Hibernate Store.
- * Look at @link NewSpringHibernateFunctionalWorkflowTestCase for a use case.
- */
-public class NewSpringHibernateWorkflowStore extends AbstractHibernateWorkflowStore {
-    //~ Instance fields ////////////////////////////////////////////////////////
-
-    private SessionFactory sessionFactory;
-
-    //~ Constructors ///////////////////////////////////////////////////////////
-
-    public NewSpringHibernateWorkflowStore() {
-        super();
-    }
-
-    //~ Methods ////////////////////////////////////////////////////////////////
-
-    public void setSessionFactory(SessionFactory sessionFactory) {
-        this.sessionFactory = sessionFactory;
-    }
-
-    public SessionFactory getSessionFactory() {
-        return sessionFactory;
-    }
-
-    public void init(Map props) throws StoreException {
-    }
-
-    protected Object execute(final InternalCallback action) throws StoreException {
-        HibernateTemplate template = new HibernateTemplate(getSessionFactory());
-
-        return template.execute(new HibernateCallback() {
-                public Object doInHibernate(Session session) throws HibernateException, SQLException {
-                    try {
-                        return action.doInHibernate(session);
-                    } catch (StoreException e) {
-                        throw new RuntimeException(e);
-                    }
-                }
-            });
-    }
-}

File src/java/com/opensymphony/workflow/spi/hibernate3/SpringHibernateWorkflowStore.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.workflow.spi.hibernate3;
+
+import com.opensymphony.workflow.StoreException;
+
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+
+import org.springframework.orm.hibernate3.HibernateCallback;
+import org.springframework.orm.hibernate3.HibernateTemplate;
+
+import java.sql.SQLException;
+
+import java.util.Map;
+
+
+/**
+ * @author masini
+ *
+ * New Refactored Spring Managed Hibernate Store.
+ * Look at @link NewSpringHibernateFunctionalWorkflowTestCase for a use case.
+ */
+public class SpringHibernateWorkflowStore extends AbstractHibernateWorkflowStore {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    private SessionFactory sessionFactory;
+
+    //~ Constructors ///////////////////////////////////////////////////////////
+
+    public SpringHibernateWorkflowStore() {
+        super();
+    }
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void setSessionFactory(SessionFactory sessionFactory) {
+        this.sessionFactory = sessionFactory;
+    }
+
+    public SessionFactory getSessionFactory() {
+        return sessionFactory;
+    }
+
+    public void init(Map props) throws StoreException {
+    }
+
+    protected Object execute(final InternalCallback action) throws StoreException {
+        HibernateTemplate template = new HibernateTemplate(getSessionFactory());
+
+        return template.execute(new HibernateCallback() {
+                public Object doInHibernate(Session session) throws HibernateException, SQLException {
+                    try {
+                        return action.doInHibernate(session);
+                    } catch (StoreException e) {
+                        throw new RuntimeException(e);
+                    }
+                }
+            });
+    }
+}

File src/test/new-osworkflow-hibernate3.xml

 <osworkflow>
   <!-- The hibernate store requires that you specify the session factory in ConfigLoader.persistenceArgs
        See javadocs for the store -->
-  <persistence class="com.opensymphony.workflow.spi.hibernate3.NewHibernateWorkflowStore" />
+  <persistence class="com.opensymphony.workflow.spi.hibernate3.HibernateWorkflowStore" />
   <factory class="com.opensymphony.workflow.loader.URLWorkflowFactory">
     <property key="cache" value="true" />
   </factory>