Interface ServiceWithNavigableEntities
- All Superinterfaces:
OperationsOnEntityCollections
OData Service interface to provide type-safe and recursive access to nested entities and their navigation properties.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <EntityT extends VdmEntity<EntityT>,
ResultT>
CollectionValueActionRequestBuilder<ResultT>applyAction
(BoundAction.CollectionToCollection<EntityT, ResultT> action) Apply a bound action returning a collection of objects to the current entity collection.default <EntityT extends VdmEntity<EntityT>,
ResultT>
SingleValueActionRequestBuilder<ResultT>applyAction
(BoundAction.CollectionToSingle<EntityT, ResultT> action) Apply a bound action returning a single or no object to an entity collection of the service.default <EntityT extends VdmEntity<EntityT>,
ResultT>
CollectionValueFunctionRequestBuilder<ResultT>applyFunction
(BoundFunction.CollectionToCollection<EntityT, ResultT> function) Apply a bound function returning a collection of objects to the current element.default <EntityT extends VdmEntity<EntityT>,
ResultT>
SingleValueFunctionRequestBuilder<ResultT>applyFunction
(BoundFunction.CollectionToSingle<EntityT, ResultT> function) Apply a bound function returning a single object to the current element.default <EntityT extends VdmEntity<EntityT>>
NavigableEntitySingle<EntityT>forEntity
(EntityT entity) Create a generic type-safe request using navigation properties on entity sets of the OData service.Getter for the OData service root path.default <EntityT extends VdmEntity<EntityT>,
ResultT extends VdmEntity<ResultT>>
NavigableEntityCollection<ResultT>withFunction
(BoundFunction.CollectionToCollectionEntity.Composable<EntityT, ResultT> function) Use a composable function as a path element in an OData request.default <EntityT extends VdmEntity<EntityT>,
ResultT extends VdmEntity<ResultT>>
NavigableEntitySingle<ResultT>withFunction
(BoundFunction.CollectionToSingleEntity.Composable<EntityT, ResultT> function) Use a composable function as a path element in an OData request.
-
Method Details
-
getServicePath
Getter for the OData service root path.- Returns:
- the service path.
-
forEntity
@Nonnull default <EntityT extends VdmEntity<EntityT>> NavigableEntitySingle<EntityT> forEntity(@Nonnull EntityT entity) Create a generic type-safe request using navigation properties on entity sets of the OData service.- Specified by:
forEntity
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The generic entity type for which navigation properties can be accessed.- Parameters:
entity
- A template entity instance that contains all necessary key attributes.Constraints: Not nullable
- Returns:
- A request builder to navigate the service request using the provided key fields of an entity. With another navigation property this object can be used to instantiate new request builders.
-
withFunction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT extends VdmEntity<ResultT>> NavigableEntitySingle<ResultT> withFunction(@Nonnull BoundFunction.CollectionToSingleEntity.Composable<EntityT, ResultT> function) Use a composable function as a path element in an OData request. Similar toapplyFunction
but allows further path segments after the function. Functions must be marked ascomposable
by the service.- Specified by:
withFunction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The entity typeResultT
- The return type of the function.- Parameters:
function
- The composable functions.- Returns:
- A request builder that allows for adding further path segments.
-
withFunction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT extends VdmEntity<ResultT>> NavigableEntityCollection<ResultT> withFunction(@Nonnull BoundFunction.CollectionToCollectionEntity.Composable<EntityT, ResultT> function) Use a composable function as a path element in an OData request. Similar toapplyFunction
but allows further path segments after the function. Functions must be marked ascomposable
by the service.- Specified by:
withFunction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The entity typeResultT
- The return type of the function.- Parameters:
function
- The composable functions.- Returns:
- A request builder that allows for adding further path segments.
-
applyAction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT> CollectionValueActionRequestBuilder<ResultT> applyAction(@Nonnull BoundAction.CollectionToCollection<EntityT, ResultT> action) Apply a bound action returning a collection of objects to the current entity collection.- Specified by:
applyAction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The entity typeResultT
- The return type of the action.- Parameters:
action
- The action to apply. Actions are available on generated entity classes.- Returns:
- A new request builder for the supplied action applied to the current elements.
-
applyAction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT> SingleValueActionRequestBuilder<ResultT> applyAction(@Nonnull BoundAction.CollectionToSingle<EntityT, ResultT> action) Apply a bound action returning a single or no object to an entity collection of the service.- Specified by:
applyAction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The type this function is bound toResultT
- The return type of the action.- Parameters:
action
- The action to apply. Actions are available on generated entity classes.- Returns:
- A new request builder for the supplied action applied to the current elements.
-
applyFunction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT> SingleValueFunctionRequestBuilder<ResultT> applyFunction(@Nonnull BoundFunction.CollectionToSingle<EntityT, ResultT> function) Apply a bound function returning a single object to the current element.- Specified by:
applyFunction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The type this function is bound toResultT
- The return type of the function.- Parameters:
function
- The function to apply. Functions are available on generated entity classes.- Returns:
- A new request builder for the supplied function applied to the current element.
-
applyFunction
@Nonnull default <EntityT extends VdmEntity<EntityT>,ResultT> CollectionValueFunctionRequestBuilder<ResultT> applyFunction(@Nonnull BoundFunction.CollectionToCollection<EntityT, ResultT> function) Apply a bound function returning a collection of objects to the current element.- Specified by:
applyFunction
in interfaceOperationsOnEntityCollections
- Type Parameters:
EntityT
- The type this function is bound toResultT
- The type of items in the result of the function.- Parameters:
function
- The function to apply. Functions are available on generated entity classes.- Returns:
- A new request builder for the supplied function applied to the current element.
-