@param ApplicationRoot The current running context of the application @param moduleId Identifier of module @return The db stored solution key value for the moduleId submitted
(String ApplicationRoot, String moduleId)
| 1239 | * @return The db stored solution key value for the moduleId submitted |
| 1240 | */ |
| 1241 | public static String getModuleResult (String ApplicationRoot, String moduleId) |
| 1242 | { |
| 1243 | log.debug("*** Getter.getModuleResult ***"); |
| 1244 | String moduleFound = null; |
| 1245 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 1246 | try |
| 1247 | { |
| 1248 | CallableStatement callstmt = conn.prepareCall("call moduleGetResult(?)"); |
| 1249 | log.debug("Gathering moduleGetResult ResultSet"); |
| 1250 | callstmt.setString(1, moduleId); |
| 1251 | ResultSet moduleFind = callstmt.executeQuery(); |
| 1252 | log.debug("Opening Result Set from moduleGetResult"); |
| 1253 | moduleFind.next(); |
| 1254 | log.debug("Module " + moduleFind.getString(1) + " Found"); |
| 1255 | moduleFound = moduleFind.getString(2); |
| 1256 | } |
| 1257 | catch(Exception e) |
| 1258 | { |
| 1259 | log.error("Module did not exist: " + e.toString()); |
| 1260 | moduleFound = null; |
| 1261 | } |
| 1262 | Database.closeConnection(conn); |
| 1263 | log.debug("*** END getModuleResult ***"); |
| 1264 | return moduleFound; |
| 1265 | } |
| 1266 | |
| 1267 | /** |
| 1268 | * Returns the result key for a module using the module's hash for the lookup procedure. |