org.odata4j.core
Interface OFunctionRequest<T>

Type Parameters:
T - the entity representation as a java type
All Superinterfaces:
OQueryRequest<T>
All Known Implementing Classes:
ConsumerFunctionCallRequest

public interface OFunctionRequest<T>
extends OQueryRequest<T>

A consumer-side function-request builder. Call OQueryRequest.execute() to issue the request.

Usage example:

 Enumerable<OObject> e = myConsumer.callFunction("AFunction")
     .pBoolean("Parameter1", false)
     .pInt32("Parameter2", 55)
     .execute();
 
 

Note: OData functions can return single instances or collections of instances. To keep the interface simple, callFunction always returns an Enumerable.


Method Summary
 OFunctionRequest<T> parameter(String name, OObject value)
          Adds a generic parameter.
 OFunctionRequest<T> pBoolean(String name, boolean value)
          Adds a boolean parameter.
 OFunctionRequest<T> pByte(String name, UnsignedByte value)
          Adds a byte parameter.
 OFunctionRequest<T> pDateTime(String name, Calendar value)
          Adds a datetime parameter.
 OFunctionRequest<T> pDateTime(String name, Date value)
          Adds a datetime parameter.
 OFunctionRequest<T> pDateTime(String name, LocalDateTime value)
          Adds a datetime parameter.
 OFunctionRequest<T> pDecimal(String name, BigDecimal value)
          Adds a decimal parameter.
 OFunctionRequest<T> pDouble(String name, double value)
          Adds a double parameter.
 OFunctionRequest<T> pGuid(String name, Guid value)
          Adds a guid parameter.
 OFunctionRequest<T> pInt16(String name, short value)
          Adds a 16-bit integer parameter.
 OFunctionRequest<T> pInt32(String name, int value)
          Adds a 32-bit integer parameter.
 OFunctionRequest<T> pInt64(String name, long value)
          Adds a 64-bit integer parameter.
 OFunctionRequest<T> pSByte(String name, byte value)
          Adds a sbyte parameter.
 OFunctionRequest<T> pSingle(String name, float value)
          Adds a single parameter.
 OFunctionRequest<T> pString(String name, String value)
          Adds a string parameter.
 OFunctionRequest<T> pTime(String name, Calendar value)
          Adds a time parameter.
 OFunctionRequest<T> pTime(String name, Date value)
          Adds a time parameter.
 OFunctionRequest<T> pTime(String name, LocalDateTime value)
          Adds a time parameter.
 
Methods inherited from interface org.odata4j.core.OQueryRequest
custom, execute, expand, filter, nav, nav, orderBy, select, skip, top
 

Method Detail

parameter

OFunctionRequest<T> parameter(String name,
                              OObject value)
Adds a generic parameter.


pBoolean

OFunctionRequest<T> pBoolean(String name,
                             boolean value)
Adds a boolean parameter.


pByte

OFunctionRequest<T> pByte(String name,
                          UnsignedByte value)
Adds a byte parameter.


pDateTime

OFunctionRequest<T> pDateTime(String name,
                              Calendar value)
Adds a datetime parameter.


pDateTime

OFunctionRequest<T> pDateTime(String name,
                              Date value)
Adds a datetime parameter.


pDateTime

OFunctionRequest<T> pDateTime(String name,
                              LocalDateTime value)
Adds a datetime parameter.


pDecimal

OFunctionRequest<T> pDecimal(String name,
                             BigDecimal value)
Adds a decimal parameter.


pDouble

OFunctionRequest<T> pDouble(String name,
                            double value)
Adds a double parameter.


pGuid

OFunctionRequest<T> pGuid(String name,
                          Guid value)
Adds a guid parameter.


pInt16

OFunctionRequest<T> pInt16(String name,
                           short value)
Adds a 16-bit integer parameter.


pInt32

OFunctionRequest<T> pInt32(String name,
                           int value)
Adds a 32-bit integer parameter.


pInt64

OFunctionRequest<T> pInt64(String name,
                           long value)
Adds a 64-bit integer parameter.


pSByte

OFunctionRequest<T> pSByte(String name,
                           byte value)
Adds a sbyte parameter.


pSingle

OFunctionRequest<T> pSingle(String name,
                            float value)
Adds a single parameter.


pString

OFunctionRequest<T> pString(String name,
                            String value)
Adds a string parameter.


pTime

OFunctionRequest<T> pTime(String name,
                          Calendar value)
Adds a time parameter.


pTime

OFunctionRequest<T> pTime(String name,
                          Date value)
Adds a time parameter.


pTime

OFunctionRequest<T> pTime(String name,
                          LocalDateTime value)
Adds a time parameter.



http://odata4j.org