Issue #3026 - fixes to data access for HPE label generation

Former-commit-id: 8d30af1c970cca70fe74560d3157e754e1164785
This commit is contained in:
Mike Duff 2014-11-12 18:29:12 -06:00
parent 39db26fb1d
commit 15f9d1ef50
2 changed files with 17 additions and 12 deletions

View file

@ -44,6 +44,7 @@ import com.raytheon.uf.edex.plugin.hpe.util.HpeEnums.HpeDataSource;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 26, 2014 3026 mpduff Initial creation
* Nov 12, 2014 3026 mpduff Fix handling of query results
*
* </pre>
*
@ -166,20 +167,23 @@ public class HpeDataAccessor {
Object[] results = dao.executeSQLQuery(FULL_HPE_RADAR_RESULT_QUERY
+ where);
if (results != null && results.length == 5) {
hpeResult.setHpeProductName((String) results[0]);
hpeResult.setProductTime((Date) results[1]);
if (results != null && results.length == 1) {
Object[] result = (Object[]) results[0];
if (result.length == 5) {
hpeResult.setHpeProductName((String) result[0]);
hpeResult.setProductTime((Date) result[1]);
if (results[2] != null) {
hpeResult.setNumRadarAvailable((Integer) results[2]);
}
if (result[2] != null) {
hpeResult.setNumRadarAvailable((Short) result[2]);
}
if (results[3] != null) {
hpeResult.setBiasSource((String) results[3]);
}
if (result[3] != null) {
hpeResult.setBiasSource((String) result[3]);
}
if (results[4] != null) {
hpeResult.setRadarDataSource((String) results[4]);
if (result[4] != null) {
hpeResult.setRadarDataSource((String) result[4]);
}
}
}
} catch (Exception e) {

View file

@ -29,6 +29,7 @@ package com.raytheon.uf.edex.plugin.hpe.util;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 23, 2014 3026 mpduff Initial creation
* Nov 12, 2014 3026 mpduff Corrected entry
*
* </pre>
*
@ -53,7 +54,7 @@ public class HpeEnums {
* HPE Bias Source.
*/
public enum HpeBiasSource {
RFC_MEAN_BIAS("RCF MEAN BIAS"), SITE_MEAN_BIAS("SITE MEAN BIAS"), SITE_LOCAL_BIAS(
RFC_MEAN_BIAS("RFC MEAN BIAS"), SITE_MEAN_BIAS("SITE MEAN BIAS"), SITE_LOCAL_BIAS(
"SITE LOCAL BIAS"), NO_BIAS("NO BIAS");
private final String biasSource;