ASM #530 - Enable calculation/display of snow accum for GFSEnsemble

Change-Id: I0036ab27ba16fc530d48853e9de4b3f7e763dc43

Former-commit-id: 7cd9dec78e [formerly fe1d0f147e2b0e4106afd092bb381e7958ca7a6e]
Former-commit-id: 9a72fdc4e2
This commit is contained in:
Melissa Porricel 2014-04-14 11:48:00 -04:00
parent 529059851a
commit c5fed02653

View file

@ -72,6 +72,9 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
* Feb 15, 2013 1638 mschenke Moved DataURINotificationMessage to uf.common.dataplugin
* Mar 07, 2013 1587 bsteffen rewrite static data generation.
* Mar 14, 2013 1587 bsteffen Fix persisting to datastore.
* Apr 14, 2014 DR 16752 MPorricelli Add ensembleid to hash key to allow
* creation of static data for all perturbations
* of Ensemble models
*
* </pre>
*
@ -445,12 +448,15 @@ public class StaticDataGenerator {
private final int forecastTime;
private final int coverageid;
private final String ensembleid;
public CacheKey(GridRecord record) {
this.datasetid = record.getDatasetId();
this.refTime = record.getDataTime().getRefTime();
this.forecastTime = record.getDataTime().getFcstTime();
this.coverageid = record.getLocation().getId();
this.ensembleid = record.getEnsembleId();
}
@Override
@ -463,6 +469,8 @@ public class StaticDataGenerator {
result = (prime * result) + forecastTime;
result = (prime * result)
+ ((refTime == null) ? 0 : refTime.hashCode());
result = (prime * result)
+ ((ensembleid == null) ? 0 : ensembleid.hashCode());
return result;
}
@ -498,6 +506,13 @@ public class StaticDataGenerator {
} else if (!refTime.equals(other.refTime)) {
return false;
}
if (ensembleid == null) {
if (other.ensembleid != null) {
return false;
}
} else if (!ensembleid.equals(other.ensembleid)) {
return false;
}
return true;
}