public abstract class FluentHelperRead<FluentHelperT,EntityT extends VdmEntity<?>,SelectableT> extends FluentHelperBasic<FluentHelperT,EntityT,List<EntityT>>
Constructor and Description |
---|
FluentHelperRead() |
Modifier and Type | Method and Description |
---|---|
List<EntityT> |
execute(ErpEndpoint erpEndpoint)
Executes the underlying query using the stored values, plus any query modifiers that were previously called.
|
FluentHelperT |
filter(ExpressionFluentHelper<EntityT> expression)
Query modifier to restrict the set of returned entities based on the values of one or more fields.
|
FluentHelperT |
orderBy(EntityField<EntityT,?> field,
Order order)
Query modifier to sort the set of returned entities by one or more fields.
|
FluentHelperT |
select(SelectableT... fields)
Query modifier to limit which field values of the entity get fetched and populated, and to specify which
navigation properties to expand.
|
FluentHelperT |
skip(Number skip)
Query modifier to not return the first N entities of the result set.
|
FluentHelperT |
top(Number top)
Query modifier to limit the number of entities returned.
|
com.sap.cloud.sdk.odatav2.connectivity.ODataQuery |
toQuery()
Provides access to the underlying Query object for inspection and logging purposes.
|
FluentHelperT |
withErrorHandler(com.sap.cloud.sdk.odatav2.connectivity.ErrorResultHandler<?> errorResultHandler)
An error handling class that implements the
ErrorResultHandler interface can be
attached to this fluent helper. |
execute, execute
public FluentHelperT select(SelectableT... fields)
fields
- Fields to select and/or navigation properties to expand.public FluentHelperT orderBy(EntityField<EntityT,?> field, Order order)
field
- Field to sort by.order
- Sorting direction to use (ascending or descending).public FluentHelperT top(Number top)
top
- Number of entities to limit the result set to.public FluentHelperT skip(Number skip)
skip
- Number of entities to skip by.public FluentHelperT withErrorHandler(com.sap.cloud.sdk.odatav2.connectivity.ErrorResultHandler<?> errorResultHandler)
ErrorResultHandler
interface can be
attached to this fluent helper. This allows custom logic to be called when an error occurs in the
execute
method. If this method is not called, then an instance of
ODataVdmErrorResultHandler
is
used. Only one handler can be attached at a time per fluent helper object, so calling this multiple times will
replace the handler.errorResultHandler
- Instance of an error handler class that implements the ErrorResultHandler
interface.public com.sap.cloud.sdk.odatav2.connectivity.ODataQuery toQuery()
public List<EntityT> execute(ErpEndpoint erpEndpoint) throws com.sap.cloud.sdk.odatav2.connectivity.ODataException
execute
in class FluentHelperBasic<FluentHelperT,EntityT extends VdmEntity<?>,List<EntityT extends VdmEntity<?>>>
erpEndpoint
- Supply the ERP system instance for executing the underlying OData query.com.sap.cloud.sdk.odatav2.connectivity.ODataException
ErpConfigContext.ErpConfigContext()
,
ErpEndpoint.ErpEndpoint(ErpConfigContext)
public FluentHelperT filter(ExpressionFluentHelper<EntityT> expression)
expression
- Fluent helper that represents a field value expression. To create this, start with an
EntityField
constant in your
respective entity type for the desired entity field. Then call one of the comparison operators and
provide a comparison value. Optionally the resulting fluent helper can be chained with other
expression fluent helpers.Copyright © 2017 SAP SE. All rights reserved.