@Override public ODataResponse existsEntity(final GetEntityCountUriInfo uriInfo, final String contentType) throws ODataException { final Object data = retrieveData( uriInfo.getStartEntitySet(), uriInfo.getKeyPredicates(), uriInfo.getFunctionImport(), mapFunctionParameters(uriInfo.getFunctionImportParameters()), uriInfo.getNavigationSegments()); return ODataResponse.fromResponse(EntityProvider.writeText(appliesFilter(data, uriInfo.getFilter()) ? "1" : "0")) .build(); }
@Override public IDataProviderResponse existsEntity(GetEntityCountUriInfo uriInfo, ODataContext context) throws ODataException { GetEntityCountUriInfo resolvedUriInfo = resolveCrossServiceNavigation((UriInfo) uriInfo, context); IDataProvider provider = getTargetDataProvider(resolvedUriInfo.getFunctionImport(), resolvedUriInfo.getStartEntitySet()); if (provider == null) { throw new DataProviderException(DataProviderException.NOT_IMPLEMENTED.addContent("existsEntity"), context.getAcceptableLanguages().get(0)); } else { return provider.existsEntity(resolvedUriInfo, context); } }
@Override public ODataResponse existsEntity(final GetEntityCountUriInfo uriInfo, final String contentType) throws ODataException { final Object data = retrieveData( uriInfo.getStartEntitySet(), uriInfo.getKeyPredicates(), uriInfo.getFunctionImport(), mapFunctionParameters(uriInfo.getFunctionImportParameters()), uriInfo.getNavigationSegments()); return ODataResponse.fromResponse(EntityProvider.writeText(appliesFilter(data, uriInfo.getFilter()) ? "1" : "0")) .build(); }
@Override public ODataResponse existsEntity(final GetEntityCountUriInfo uriInfo, final String contentType) throws ODataException { final Object data = retrieveData( uriInfo.getStartEntitySet(), uriInfo.getKeyPredicates(), uriInfo.getFunctionImport(), mapFunctionParameters(uriInfo.getFunctionImportParameters()), uriInfo.getNavigationSegments()); return ODataResponse.fromResponse(EntityProvider.writeText(appliesFilter(data, uriInfo.getFilter()) ? "1" : "0")) .build(); }