org.odata4j.consumer
Class ConsumerCountRequest

java.lang.Object
  extended by org.odata4j.consumer.ConsumerCountRequest
All Implemented Interfaces:
OCountRequest

public class ConsumerCountRequest
extends Object
implements OCountRequest

Count-request implementation.


Constructor Summary
ConsumerCountRequest(ODataClient client, String serviceRootUri)
           
 
Method Summary
 ConsumerCountRequest entitySetName(String entitySetName)
          Sets the name of the entity-set to count.
 int execute()
          Sends the count-request to the OData service and returns the result.
 ConsumerCountRequest top(int top)
          Sets a maximum limit on the result returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsumerCountRequest

public ConsumerCountRequest(ODataClient client,
                            String serviceRootUri)
Method Detail

entitySetName

public ConsumerCountRequest entitySetName(String entitySetName)
Description copied from interface: OCountRequest
Sets the name of the entity-set to count.

Specified by:
entitySetName in interface OCountRequest
Parameters:
entitySetName - the name of the entity collection
Returns:
the count-request builder

execute

public int execute()
            throws ODataProducerException
Description copied from interface: OCountRequest
Sends the count-request to the OData service and returns the result.

Specified by:
execute in interface OCountRequest
Returns:
the count
Throws:
ODataProducerException - error from the producer

top

public ConsumerCountRequest top(int top)
Description copied from interface: OCountRequest
Sets a maximum limit on the result returned.

Specified by:
top in interface OCountRequest
Parameters:
top - the maximum limit
Returns:
the count-request builder


http://odata4j.org