Package org.eclipse.persistence.jpa.rs.features.paging

Examples of org.eclipse.persistence.jpa.rs.features.paging.PageableQueryValidator


            throw JPARSException.exceptionOccurred(ex);
        }
    }

    private Response processPageableQuery(PersistenceContext context, String queryName, DatabaseQuery dbQuery, Query query, HttpHeaders headers, UriInfo uriInfo) {
        final PageableQueryValidator validator = new PageableQueryValidator(context, queryName, uriInfo);
        if (validator.isFeatureApplicable()) {
            // Do pagination
            query.setFirstResult(validator.getOffset());
            query.setMaxResults(validator.getLimit());
            return namedQueryResponse(context, queryName, dbQuery, query, headers, uriInfo, new PagingResponseBuilder());
        } else {
            // No pagination
            return namedQueryResponse(context, queryName, dbQuery, query, headers, uriInfo, new SelfLinksResponseBuilder());
        }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.rs.features.paging.PageableQueryValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.