use of net.geoprism.registry.etl.ListTypeJobQuery in project geoprism-registry by terraframe.
the class ListType method getJobs.
public List<ListTypeJob> getJobs() {
ListTypeJobQuery query = new ListTypeJobQuery(new QueryFactory());
query.WHERE(query.getListType().EQ(this));
try (OIterator<? extends ListTypeJob> it = query.getIterator()) {
return new LinkedList<ListTypeJob>(it.getAll());
}
}
use of net.geoprism.registry.etl.ListTypeJobQuery in project geoprism-registry by terraframe.
the class ListTypeService method getPublishJobs.
@Request(RequestType.SESSION)
public JsonObject getPublishJobs(String sessionId, String oid, int pageSize, int pageNumber, String sortAttr, boolean isAscending) {
QueryFactory qf = new QueryFactory();
final ListTypeJobQuery query = new ListTypeJobQuery(qf);
query.WHERE(query.getListType().EQ(oid));
query.ORDER_BY_DESC(query.getCreateDate());
// query.ORDER_BY(ihq.get(sortAttr), order);
query.restrictRows(pageSize, pageNumber);
try (OIterator<? extends ListTypeJob> it = query.getIterator()) {
List<JsonSerializable> results = new LinkedList<>(it.getAll());
return new Page<JsonSerializable>(query.getCount(), query.getPageNumber(), query.getPageSize(), results).toJSON();
}
}
Aggregations