if(limit > configuration.getMaxLimit())
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);