use of org.opennms.netmgt.model.OnmsAcknowledgmentCollection in project opennms by OpenNMS.
the class AcknowledgmentRestService method getAcks.
/**
* <p>getAcks</p>
*
* @return a {@link org.opennms.netmgt.model.OnmsAcknowledgmentCollection} object.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML })
@Transactional
public OnmsAcknowledgmentCollection getAcks(@Context final UriInfo uriInfo) {
final CriteriaBuilder builder = getQueryFilters(uriInfo.getQueryParameters());
OnmsAcknowledgmentCollection coll = new OnmsAcknowledgmentCollection(m_ackDao.findMatching(builder.toCriteria()));
//For getting totalCount
builder.clearOrder();
builder.limit(null);
builder.offset(null);
coll.setTotalCount(m_ackDao.countMatching(builder.toCriteria()));
return coll;
}
Aggregations