Merge "Issue #189 use maxRecords in GFEDao.getD2DDatabaseIdsFromDb" into development
Former-commit-id:0fe91e0d95
[formerly 46116a80d319050628e6c8a7d01c7c2d0bb5402f] Former-commit-id:86c4a247cd
This commit is contained in:
commit
29559e851e
1 changed files with 6 additions and 4 deletions
|
@ -760,7 +760,8 @@ public class GFEDao extends DefaultPluginDao {
|
|||
Pattern p = Pattern.compile("^" + abbreviation + "(\\d+)hr$");
|
||||
int lowestHr = -1;
|
||||
for (GridInfoRecord m : (List<GridInfoRecord>) results) {
|
||||
String param = m.getParameter().getAbbreviation().toLowerCase();
|
||||
String param = m.getParameter().getAbbreviation()
|
||||
.toLowerCase();
|
||||
if (param.equals(abbreviation) && (lowestHr < 0)) {
|
||||
model = m;
|
||||
} else {
|
||||
|
@ -846,7 +847,7 @@ public class GFEDao extends DefaultPluginDao {
|
|||
if (dTimeList.contains(tr)) {
|
||||
timeList.add(new TimeRange(tr.getStart(), tr.getStart()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!timeList.isEmpty()) {
|
||||
return timeList;
|
||||
|
@ -867,7 +868,6 @@ public class GFEDao extends DefaultPluginDao {
|
|||
return timeList;
|
||||
}
|
||||
|
||||
|
||||
private List<DataTime> executeD2DParmQuery(ParmID id)
|
||||
throws DataAccessLayerException {
|
||||
List<DataTime> times = new ArrayList<DataTime>();
|
||||
|
@ -913,7 +913,9 @@ public class GFEDao extends DefaultPluginDao {
|
|||
query.addDistinctParameter("dataTime.refTime");
|
||||
query.addQueryParam(GridConstants.DATASET_ID, d2dModelName);
|
||||
query.addOrder("dataTime.refTime", false);
|
||||
|
||||
if (maxRecords > 0) {
|
||||
query.setMaxResults(maxRecords);
|
||||
}
|
||||
List<?> result = this.queryByCriteria(query);
|
||||
|
||||
for (Object obj : result) {
|
||||
|
|
Loading…
Add table
Reference in a new issue