private void setOrderBy(QueryRequest queryRequest, GetEntitySetUriInfo uriInfo) { OrderByExpressionImpl orderItem = null; if (uriInfo.getOrderBy() != null) { for (OrderExpression orderExpr : uriInfo.getOrderBy().getOrders()) { SortOrder sortOrder = orderExpr.getSortOrder(); String order = sortOrder.name(); boolean isDescending = order.equals("desc"); String expression = orderExpr.getExpression().getUriLiteral(); orderItem = new OrderByExpressionImpl(isDescending, expression); ((QueryRequestImpl) queryRequest).setOrderByOption(orderItem); } } }
protected String generateOrderByFileds() throws ODataJPARuntimeException, EdmException { if (entitySetView.getOrderBy() != null) { return ODataExpressionParser.parseToJPAOrderByExpression(entitySetView.getOrderBy(), getJPAEntityAlias()); } else if (entitySetView.getTop() != null || entitySetView.getSkip() != null || pagingRequested == true) { return ODataExpressionParser.parseKeyPropertiesToJPAOrderByExpression(entitySetView.getTargetEntitySet() .getEntityType().getKeyProperties(), getJPAEntityAlias()); } else { return null; } }
protected String generateOrderByFileds() throws ODataJPARuntimeException, EdmException { if (entitySetView.getOrderBy() != null) { return ODataExpressionParser.parseToJPAOrderByExpression(entitySetView.getOrderBy(), getJPAEntityAlias()); } else if ((entitySetView.getTop() != null || entitySetView.getSkip() != null || pagingRequested == true) && !getType().equals(JPQLContextType.SELECT_COUNT)) { return ODataExpressionParser.parseKeyPropertiesToJPAOrderByExpression(entitySetView.getTargetEntitySet() .getEntityType().getKeyProperties(), getJPAEntityAlias()); } else { return null; } }
uriInfo.getFilter(), inlineCountType, uriInfo.getOrderBy(), uriInfo.getSkipToken(), uriInfo.getSkip(), if (uriInfo.getOrderBy() == null && uriInfo.getSkipToken() == null && uriInfo.getSkip() == null
uriInfo.getFilter(), inlineCountType, uriInfo.getOrderBy(), uriInfo.getSkipToken(), uriInfo.getSkip(), if (uriInfo.getOrderBy() == null && uriInfo.getSkipToken() == null && uriInfo.getSkip() == null
uriInfo.getFilter(), inlineCountType, uriInfo.getOrderBy(), uriInfo.getSkipToken(), uriInfo.getSkip(), if (uriInfo.getOrderBy() == null && uriInfo.getSkipToken() == null && uriInfo.getSkip() == null