Class CountReader
java.lang.Object
de.hybris.platform.odata2services.odata.processor.reader.AbstractEntityReader
de.hybris.platform.odata2services.odata.processor.reader.CountReader
- All Implemented Interfaces:
EntityReader
The
CountReader reads number of items in the platform matching the request conditions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ModelEntityServicebooleanisApplicable(org.apache.olingo.odata2.api.uri.UriInfo uriInfo) Indicates whether this EntityReader can read the requested informationorg.apache.olingo.odata2.api.processor.ODataResponseread(ItemLookupRequest request) Reads from the commerce suite the requested informationvoidsetEntityService(ModelEntityService service) Methods inherited from class de.hybris.platform.odata2services.odata.processor.reader.AbstractEntityReader
getPersistenceService, getResponseWriter, handleAssociationMultiplicityRetrievalError, setPersistenceService, setResponseWriter, setTypePermissionService, validateReadPermission
-
Constructor Details
-
CountReader
public CountReader()
-
-
Method Details
-
isApplicable
public boolean isApplicable(org.apache.olingo.odata2.api.uri.UriInfo uriInfo) Description copied from interface:EntityReaderIndicates whether this EntityReader can read the requested information- Parameters:
uriInfo- Used to determine whether this EntityReader is applicable- Returns:
trueif this EntityReader can do the read, otherwisefalse
-
read
public org.apache.olingo.odata2.api.processor.ODataResponse read(ItemLookupRequest request) throws org.apache.olingo.odata2.api.exception.ODataException Reads from the commerce suite the requested informationThis method reads only number of items matching the conditions specified in the
request.- Parameters:
request- parameter object that contains the request with the conditions for the items to be counted.- Returns:
- a response containing a number of matching items in its body. The response content type is
plain/textfor that reason - Throws:
org.apache.olingo.odata2.api.exception.ODataException- when the request violates the OData protocol
-
getEntityService
-
setEntityService
-