* be registered here
*/
private static EntityProviderWriteProperties getEntityProviderProperties(final ODataJPAContext odataJPAContext,
final GetEntitySetUriInfo resultsView, final List<Map<String, Object>> edmEntityList)
throws ODataJPARuntimeException {
ODataEntityProviderPropertiesBuilder entityFeedPropertiesBuilder = null;
Integer count = null;
if (resultsView.getInlineCount() != null) {
if ((resultsView.getSkip() != null || resultsView.getTop() != null)) {
// when $skip and/or $top is present with $inlinecount
count = getInlineCountForNonFilterQueryEntitySet(edmEntityList, resultsView);
} else {
// In all other cases
count = resultsView.getInlineCount() == InlineCount.ALLPAGES ? edmEntityList.size() : null;
}
}
try {
entityFeedPropertiesBuilder =
EntityProviderWriteProperties.serviceRoot(odataJPAContext.getODataContext().getPathInfo().getServiceRoot());
entityFeedPropertiesBuilder.inlineCount(count);
entityFeedPropertiesBuilder.inlineCountType(resultsView.getInlineCount());
ExpandSelectTreeNode expandSelectTree =
UriParser.createExpandSelectTree(resultsView.getSelect(), resultsView.getExpand());
entityFeedPropertiesBuilder.callbacks(JPAExpandCallBack.getCallbacks(odataJPAContext.getODataContext()
.getPathInfo().getServiceRoot(), expandSelectTree, resultsView.getExpand()));
entityFeedPropertiesBuilder.expandSelectTree(expandSelectTree);
} catch (ODataException e) {
throw ODataJPARuntimeException.throwException(ODataJPARuntimeException.INNER_EXCEPTION, e);
}
return entityFeedPropertiesBuilder.build();
}