[power-matchmaker] r2770 committed - Checking if the engine is a match engine. Currently we do not want to ...

0 views
Skip to first unread message

power-ma...@googlecode.com

unread,
Jan 27, 2011, 1:53:19 PM1/27/11
to matchmake...@googlegroups.com
Revision: 2770
Author: ThomasObrien95
Date: Thu Jan 27 10:52:11 2011
Log: Checking if the engine is a match engine. Currently we do not want to
mess with the engine but want to add a few extra steps around the match
engine. If we get more time to fix this in the future we will want to clean
this up.
http://code.google.com/p/power-matchmaker/source/detail?r=2770

Modified:
/branches/0.9.7/src/ca/sqlpower/matchmaker/swingui/engine/EngineWorker.java

=======================================
---
/branches/0.9.7/src/ca/sqlpower/matchmaker/swingui/engine/EngineWorker.java
Thu Jan 27 10:06:15 2011
+++
/branches/0.9.7/src/ca/sqlpower/matchmaker/swingui/engine/EngineWorker.java
Thu Jan 27 10:52:11 2011
@@ -30,6 +30,7 @@
import org.apache.log4j.Appender;

import ca.sqlpower.matchmaker.EngineSettingException;
+import ca.sqlpower.matchmaker.MatchEngineImpl;
import ca.sqlpower.matchmaker.MatchMakerEngine;
import ca.sqlpower.matchmaker.Project;
import ca.sqlpower.matchmaker.SourceTableException;
@@ -111,7 +112,10 @@

@Override
public void doStuff() throws EngineSettingException, IOException,
SQLException, SourceTableException, InterruptedException {
- SQLDatabase db = MMSUtils.setupProjectGraphTable(session, project,
engine.getLogger());
+ SQLDatabase db = null;
+ if (engine instanceof MatchEngineImpl) {
+ db = MMSUtils.setupProjectGraphTable(session, project,
engine.getLogger());
+ }

project.acquireEngineLock(engine);
try {
@@ -122,7 +126,9 @@
project.releaseEngineLock(engine);
}

- MMSUtils.populateProjectGraphTable(project, engine.getLogger(), db);
+ if (engine instanceof MatchEngineImpl) {
+ MMSUtils.populateProjectGraphTable(project, engine.getLogger(), db);
+ }
}

@Override

Reply all
Reply to author
Forward
0 new messages