use of org.opennms.netmgt.model.OnmsMinionCollection in project opennms by OpenNMS.
the class MinionRestService method getMinions.
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML })
@Transactional
public OnmsMinionCollection getMinions(@Context final UriInfo uriInfo) throws ParseException {
final CriteriaBuilder builder = getCriteriaBuilder(uriInfo.getQueryParameters());
final OnmsMinionCollection coll = new OnmsMinionCollection(m_minionDao.findMatching(builder.toCriteria()));
coll.setTotalCount(m_minionDao.countMatching(builder.clearOrder().toCriteria()));
return coll;
}
Aggregations