src/java/m/wqm/ipmscoresfull/V1_0_1.java
@@ -1,7 +1,7 @@ |
package m.wqm.ipmscoresfull; |
|
/** |
- * @author anvesh, od |
+ * @author anvesh, od, Shaun Case |
*/ |
import csip.ModelDataService; |
import csip.ServiceException; |
@@ -32,15 +32,18 @@ |
|
ArrayList<Result1> result1 = new ArrayList<>(); |
|
- |
@Override |
protected void doProcess() throws Exception { |
- try (Connection conn = getResourceJDBC(WQM_ID); |
+ try (Connection conn = getResourceJDBC(WQM_READONLY_ID); |
Statement statement = conn.createStatement()) { |
-// conn.setAutoCommit(false); |
// We need to return the entire table, so we use the not standard SELECT * |
// TODO why not select only what's needed? |
- String query = "SELECT * FROM wqm_ipm_scores"; |
+ String query = "SELECT ipm_score_id, ipm_mitigation_score, resource_concern, ipm_level, wqm_concern, ipm_level_name FROM "; |
+ if (conn.getMetaData().getDatabaseProductName().contains("Microsoft")) { |
+ query += " wqm.wqm_ipm_scores"; |
+ } else { |
+ query += " wqm_ipm_scores"; |
+ } |
|
try (ResultSet results = statement.executeQuery(query)) { |
while (results.next()) { |
@@ -61,7 +64,6 @@ |
} |
} |
|
- |
@Override |
protected void postProcess() throws Exception { |
JSONArray result1Arr = new JSONArray(); |
@@ -87,7 +89,6 @@ |
String wqm_concern; |
String ipm_level_name; |
|
- |
public Result1(int ipm_score_id, |
int ipm_mitigation_score, |
String resource_concern, |