Package com.dottydingo.hyperion.api

Examples of com.dottydingo.hyperion.api.EntityResponse


        PersistenceContext persistenceContext = buildPersistenceContext(phaseContext);

        List converted = plugin.getPersistenceOperations().findByIds(ids, persistenceContext);

        EntityResponse entityResponse = new EntityResponse();
        entityResponse.setEntries(converted);
        entityResponse.setResponseCount(converted.size());
        entityResponse.setStart(1);
        entityResponse.setTotalCount(new Long(converted.size()));

        phaseContext.setResult(entityResponse);

        EndpointResponse response = phaseContext.getEndpointResponse();
        response.setResponseCode(200);
View Full Code Here


            throw new BadRequestException(String.format("The limit parameter can not be greater than %d.",configuration.getMaxLimit()));

        PersistenceContext persistenceContext = buildPersistenceContext(phaseContext);
        QueryResult queryResult = phaseContext.getEntityPlugin().getPersistenceOperations().query(query, start, limit, sort, persistenceContext);

        EntityResponse entityResponse = new EntityResponse();
        entityResponse.setEntries(queryResult.getItems());
        entityResponse.setResponseCount(queryResult.getResponseCount());
        entityResponse.setStart(queryResult.getStart());
        entityResponse.setTotalCount(queryResult.getTotalCount());

        phaseContext.setResult(entityResponse);

        response.setResponseCode(200);
View Full Code Here

TOP

Related Classes of com.dottydingo.hyperion.api.EntityResponse

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.