Issue #1731 Remove unneccessary query in getDataStore.

Former-commit-id: f7148f5a98 [formerly 61875750c1] [formerly 52a64eda01] [formerly 38728f3073 [formerly 52a64eda01 [formerly e78a920afcf25b94d5ea473f96d548ce227ea435]]]
Former-commit-id: 38728f3073
Former-commit-id: 6bdf9d288a06719bf4062080d72ce5ced97ff2a3 [formerly 586438b393]
Former-commit-id: 4bdd2946ee
This commit is contained in:
Ben Steffensmeier 2013-02-28 13:57:02 -06:00
parent bbb5a8645a
commit 49d61bd471
2 changed files with 8 additions and 33 deletions

View file

@ -33,7 +33,6 @@ import com.raytheon.uf.common.datastorage.DataStoreFactory;
import com.raytheon.uf.common.datastorage.IDataStore;
import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.HDF5Util;
import com.raytheon.uf.viz.core.comm.Loader;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
@ -52,6 +51,8 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 15Mar2009 2037 dhladky Initial Creation.
* Feb 28, 2013 1731 bsteffen Remove unneccessary query in
* getDataStore.
*
* </pre>
*
@ -114,21 +115,7 @@ public class CWATResourceData extends AbstractRequestableResourceData {
* @return
*/
private IDataStore getDataStore(CWATRecord record) {
IDataStore dataStore = null;
try {
Map<String, Object> vals = new HashMap<String, Object>();
vals.put("dataURI", record.getDataURI());
vals.put("pluginName", record.getPluginName());
record = (CWATRecord) Loader.loadData(vals);
File loc = HDF5Util.findHDF5Location(record);
dataStore = DataStoreFactory.getDataStore(loc);
} catch (VizException e) {
e.printStackTrace();
}
return dataStore;
File loc = HDF5Util.findHDF5Location(record);
return DataStoreFactory.getDataStore(loc);
}
}

View file

@ -55,6 +55,8 @@ import com.raytheon.uf.viz.monitor.scan.ScanMonitor;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 13, 2009 dhladky Initial creation
* Feb 28, 2013 1731 bsteffen Remove unneccessary query in
* getDataStore.
*
* </pre>
*
@ -199,22 +201,8 @@ public class ScanResourceData extends AbstractRequestableResourceData {
* @return
*/
private IDataStore getDataStore(ScanRecord record) {
IDataStore dataStore = null;
try {
Map<String, Object> vals = new HashMap<String, Object>();
vals.put("dataURI", record.getDataURI());
vals.put("pluginName", record.getPluginName());
record = (ScanRecord) Loader.loadData(vals);
File loc = HDF5Util.findHDF5Location(record);
dataStore = DataStoreFactory.getDataStore(loc);
} catch (VizException e) {
e.printStackTrace();
}
return dataStore;
File loc = HDF5Util.findHDF5Location(record);
return DataStoreFactory.getDataStore(loc);
}
// create the monitor instance