Search in sources :

Example 6 with QueryParameters

use of org.opennms.web.utils.QueryParameters in project opennms by OpenNMS.

the class AbstractDaoRestServiceWithDTO method applyLimitOffsetOrderBy.

private static void applyLimitOffsetOrderBy(final MultivaluedMap<String, String> p, final CriteriaBuilder builder, final Integer defaultLimit) {
    final QueryParameters queryParameters = QueryParametersBuilder.buildFrom(p);
    if (queryParameters.getLimit() == null) {
        queryParameters.setLimit(defaultLimit);
    }
    CriteriaBuilderUtils.applyQueryParameters(builder, queryParameters);
}
Also used : QueryParameters(org.opennms.web.utils.QueryParameters)

Aggregations

QueryParameters (org.opennms.web.utils.QueryParameters)6 Strings (com.google.common.base.Strings)3 Arrays (java.util.Arrays)3 Comparator (java.util.Comparator)3 List (java.util.List)3 Map (java.util.Map)3 Collectors (java.util.stream.Collectors)3 GET (javax.ws.rs.GET)3 Path (javax.ws.rs.Path)3 PathParam (javax.ws.rs.PathParam)3 Produces (javax.ws.rs.Produces)3 Context (javax.ws.rs.core.Context)3 MediaType (javax.ws.rs.core.MediaType)3 Response (javax.ws.rs.core.Response)3 UriInfo (javax.ws.rs.core.UriInfo)3 JaxbListWrapper (org.opennms.core.config.api.JaxbListWrapper)3 Query (org.opennms.features.status.api.Query)3 SeverityFilter (org.opennms.features.status.api.SeverityFilter)3 StatusEntity (org.opennms.features.status.api.StatusEntity)3 StatusSummary (org.opennms.features.status.api.StatusSummary)3