Issue #189 use maxRecords in GFEDao.getD2DDatabaseIdsFromDb
Former-commit-id:e4c221eba5
[formerlyaf2808c4f4
] [formerly6e6823d62d
] [formerly6e6823d62d
[formerly5a1a6f2fdb
]] [formerlye4c221eba5
[formerlyaf2808c4f4
] [formerly6e6823d62d
] [formerly6e6823d62d
[formerly5a1a6f2fdb
]] [formerly1b4236ccc5
[formerly6e6823d62d
[formerly5a1a6f2fdb
] [formerly1b4236ccc5
[formerly 26e79c68560dced9b7148e8eebf4a7394461bd7c]]]]] Former-commit-id:1b4236ccc5
Former-commit-id:7697d4a8c1
[formerly1fe90be139
] [formerly5367f936f4
] [formerly 90b0b41d57a0d1ec0fd6273a085321a05e38e00e [formerly 5960908c4df2a4a5a484c956e47d7a5861f6bc10] [formerly5367f936f4
[formerly159817f538
]]] Former-commit-id: 6b57824f9e5bc7da5d3e36d227ad5c7b95c84cee [formerly 4092985a83a2da81f61e0bd48cedd09d7277c87d] [formerly1231facebe
[formerly6093c7cf31
]] Former-commit-id:1231facebe
Former-commit-id:d04b50ce84
This commit is contained in:
parent
bfdbd94783
commit
61de733b3a
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