Interface ServiceWithNavigableEntities

All Superinterfaces:
OperationsOnEntityCollections

public interface ServiceWithNavigableEntities extends OperationsOnEntityCollections
OData Service interface to provide type-safe and recursive access to nested entities and their navigation properties.
  • Method Details

    • getServicePath

      @Nonnull String 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 interface OperationsOnEntityCollections
      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 to applyFunction but allows further path segments after the function. Functions must be marked as composable by the service.
      Specified by:
      withFunction in interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The entity type
      ResultT - 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 to applyFunction but allows further path segments after the function. Functions must be marked as composable by the service.
      Specified by:
      withFunction in interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The entity type
      ResultT - 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 interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The entity type
      ResultT - 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 interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The type this function is bound to
      ResultT - 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 interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The type this function is bound to
      ResultT - 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 interface OperationsOnEntityCollections
      Type Parameters:
      EntityT - The type this function is bound to
      ResultT - 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.