MongoFeatureSource.java (geotools-24.0-project) | : | MongoFeatureSource.java (geotools-24.1-project) | ||
---|---|---|---|---|
skipping to change at line 306 | skipping to change at line 306 | |||
if (q.getStartIndex() != null && q.getStartIndex() != 0) { | if (q.getStartIndex() != null && q.getStartIndex() != 0) { | |||
c = c.skip(q.getStartIndex()); | c = c.skip(q.getStartIndex()); | |||
} | } | |||
if (q.getMaxFeatures() != Integer.MAX_VALUE) { | if (q.getMaxFeatures() != Integer.MAX_VALUE) { | |||
c = c.limit(q.getMaxFeatures()); | c = c.limit(q.getMaxFeatures()); | |||
} | } | |||
if (q.getSortBy() != null) { | if (q.getSortBy() != null) { | |||
BasicDBObject orderBy = new BasicDBObject(); | BasicDBObject orderBy = new BasicDBObject(); | |||
for (SortBy sortBy : q.getSortBy()) { | for (SortBy sortBy : q.getSortBy()) { | |||
String propName = sortBy.getPropertyName().getPropertyName(); | if (sortBy.getPropertyName() != null) { | |||
String property = mapper.getPropertyPath(propName); | String propName = sortBy.getPropertyName().getPropertyName() | |||
orderBy.append(property, sortBy.getSortOrder() == SortOrder.ASCE | ; | |||
NDING ? 1 : -1); | String property = mapper.getPropertyPath(propName); | |||
orderBy.append(property, sortBy.getSortOrder() == SortOrder. | ||||
ASCENDING ? 1 : -1); | ||||
} | ||||
} | } | |||
c = c.sort(orderBy); | c = c.sort(orderBy); | |||
} | } | |||
return c; | return c; | |||
} | } | |||
DBObject toQuery(Filter f) { | DBObject toQuery(Filter f) { | |||
if (isAll(f)) { | if (isAll(f)) { | |||
return new BasicDBObject(); | return new BasicDBObject(); | |||
End of changes. 1 change blocks. | ||||
4 lines changed or deleted | 7 lines changed or added |