Omaha #3692 alert alarm record is no longer a singleton

Change-Id: Ib995bc47699c515c2702e5aab677929a939a62a8

Former-commit-id: ff9be6a031b01f96eca5c390d2c5156069cfc3bd
This commit is contained in:
Brian Clements 2015-01-07 13:55:24 -06:00
parent b6fc6425df
commit d654550e11
2 changed files with 5 additions and 16 deletions

View file

@ -28,7 +28,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.raytheon.uf.common.dataplugin.shef.tables.Alertalarmval;
import com.raytheon.uf.common.dataplugin.shef.tables.AlertalarmvalId;
import com.raytheon.uf.common.dataplugin.shef.util.ShefConstants;
@ -42,7 +41,8 @@ import com.raytheon.uf.common.dataplugin.shef.util.ShefConstants;
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* June 15, 2011 9377 jnjanga Initial creation
* Jun 15, 2011 9377 jnjanga Initial creation
* Jan 07, 2015 3692 bclement no longer a singleton
*
*
* </pre>
@ -53,22 +53,10 @@ import com.raytheon.uf.common.dataplugin.shef.util.ShefConstants;
class AlertalarmRecord {
private static AlertalarmRecord instance = null;
private Map<String, List<Alertalarmval>> groups;
private final Map<String, List<Alertalarmval>> groups = new HashMap<String, List<Alertalarmval>>();
private static final String tokenizer = ShefConstants.SLASH;
private AlertalarmRecord() {
groups = new HashMap<String, List<Alertalarmval>>();
}
public static AlertalarmRecord newInstance() {
if (instance == null)
instance = new AlertalarmRecord();
return instance;
}
/**
* Inserts this row data into the record. First, determine the row data's
* group and if that group correspond to an existing bucket(key) then assign

View file

@ -45,6 +45,7 @@ import com.raytheon.uf.edex.database.dao.DaoConfig;
* Sep 05, 2013 16549 wkwock Fix the query
* Feb 13, 2014 #2783 dgilling Refactored to support running as part
* of an EDEX service.
* Jan 07, 2015 3692 bclement AlertalarmRecord is no longer a singleton
*
*
* </pre>
@ -108,7 +109,7 @@ class RecordMgr {
CoreDao dao = new CoreDao(DaoConfig.forDatabase(opt.getDbname()));
Object[] aaData = dao.executeSQLQuery(query.toString());
if (aaData != null && aaData.length > 0) {
aaRecord = AlertalarmRecord.newInstance();
aaRecord = new AlertalarmRecord();
for (int i = 0; i < aaData.length; i++) {
Object[] aaRow = (Object[]) aaData[i];
aaRecord.put(aaRow);