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
public class CountReader extends AbstractEntityReader
TheCountReaderreads number of items in the platform matching the request conditions.
-
-
Constructor Summary
Constructors Constructor Description CountReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelEntityServicegetEntityService()booleanisApplicable(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
-
-
-
-
Method Detail
-
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
protected ModelEntityService getEntityService()
-
setEntityService
public void setEntityService(ModelEntityService service)
-
-