if (action.equals("insert")) {
String mpanCore = allValues[2];
boolean isImport = Boolean
.parseBoolean(allValues[4]);
boolean isKwh = Boolean.parseBoolean(allValues[5]);
HhStartDate startDate = new HhStartDate(
allValues[3]);
String hhString = allValues[6].trim();
if (hhString.endsWith(",")) {
hhString = hhString + " ";
}
String[] vals = hhString.split(",");
if (vals.length % 2 != 0) {
StringBuilder valsBuilder = new StringBuilder();
for (String val : vals) {
valsBuilder.append(val + " ");
}
throw new UserException(
"There must be an even number of values in the list of hh data. This list is "
+ valsBuilder + ".");
}
for (int i = 0; i < vals.length; i += 2) {
String bigDecimal = vals[i];
if (bigDecimal.length() > 0) {
Character status = null;
String statusString = vals[i + 1].trim();
if (statusString.length() > 0) {
status = statusString.charAt(0);
}
hhData.add(new HhDatumRaw(mpanCore,
isImport, isKwh, startDate,
new BigDecimal(bigDecimal), status));
}
startDate = startDate.getNext();
}
HhDatum.insert(hhData.iterator(), halt);
hhData.clear();
}
totalHhTime = totalHhTime + System.currentTimeMillis()