Author: rebody
Date: 2010-08-19 10:14:16 -0400 (Thu, 19 Aug 2010)
New Revision: 6613
Modified:
jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/id/PropertyImpl.java
Log:
JBPM-2927 move propertiesTableExists() method to DbSession in jbpm-db module.
Modified: jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java
===================================================================
--- jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java 2010-08-19 07:18:17 UTC
(rev 6612)
+++ jbpm4/trunk/modules/db/src/main/java/org/jbpm/db/Upgrade.java 2010-08-19 14:14:16 UTC
(rev 6613)
@@ -37,6 +37,7 @@
import org.jbpm.pvm.internal.processengine.ProcessEngineImpl;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
import org.jbpm.pvm.internal.repository.DeploymentProperty;
+import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.util.CollectionUtil;
/**
@@ -92,8 +93,8 @@
static final PropertiesTableExists INSTANCE = new PropertiesTableExists();
public Boolean execute(Environment environment) throws Exception {
- Session session = environment.get(Session.class);
- return PropertyImpl.propertiesTableExists(session);
+ DbSession dbSession = environment.get(DbSession.class);
+ return dbSession.propertiesTableExists();
}
}
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/id/PropertyImpl.java
===================================================================
---
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/id/PropertyImpl.java 2010-08-19
07:18:17 UTC (rev 6612)
+++
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/id/PropertyImpl.java 2010-08-19
14:14:16 UTC (rev 6613)
@@ -93,17 +93,6 @@
}
}
- public static boolean propertiesTableExists(Session session) {
- try {
- session.createCriteria(PropertyImpl.class)
- .setMaxResults(1)
- .uniqueResult();
- return true;
- } catch (RuntimeException e) {
- return false;
- }
- }
-
protected static String getPropertyValue(Session session, String propertyKey) {
PropertyImpl dbidProperty = getProperty(session, propertyKey);
if (dbidProperty == null) {
Show replies by date