Package com.cbe

Class QueryChainExt

java.lang.Object
com.cbe.QueryChain
com.cbe.QueryChainExt

public class QueryChainExt extends QueryChain
Extension of class QueryChain.
[Async] QueryChainExt is used when the query is carried out
with subsequent intended join in mind.

I.e., we have passed a
QueryJoinDelegate
to the previous call and that will then be reused in the trailing join()-call.
It is an extension of class QueryChain offering join() methods
that do not require a new delegate.

Instead, these will use the delegate passed as argument in the previous
invocation in the call chain — i.e.:

  • CloudBackend::query(ContainerId,delegate::QueryJoinDelegatePtr) and
    overloads.
  • Container::query(delegate::QueryJoinDelegatePtr) and overloads.
  • QueryChain::join(Container,std::string,std::string,JoinDelegatePtr)
    and overloads.
  • Constructor Details

    • QueryChainExt

      public QueryChainExt(long cPtr, boolean cMemoryOwn)
  • Method Details

    • getCPtr

      public static long getCPtr(QueryChainExt obj)
    • finalize

      public void finalize()
      Overrides:
      finalize in class QueryChain
    • delete

      public void delete()
      Overrides:
      delete in class QueryChain
    • join

      public QueryChain join(Container containerToQuery, String key1, String key2, JoinDelegate joinDelegate)
      Performs a join request in conjunction with a query, or previous join,
      to get related items from another container.

      Asynchronous version of this service function.

      Overrides:
      join in class QueryChain
      Parameters:
      containerToQuery -
      The container of which the join shall be done with.
      key1 -
      The key from the previous query on which to perform the join.
      key2 -
      The key on objects in containerToQuery on which to perform the
      join
      joinDelegate -
      Pointer to a JoinDelegate
      instance, implemented by the user, that receives the response of
      this query request.

      I.e., either of the JoinDelegate callback functions
      delegate::JoinDelegate::onJoinSuccess()
      "onJoinSuccess()" or
      delegate::JoinDelegate::onJoinError()
      "onJoinError()"
      will be called.
    • join

      public QueryChain join(Container containerToQuery, String key1, String key2, Filter constraints, JoinDelegate joinDelegate)
      Same as
      join(Container,std::string,std::string,delegate::JoinDelegatePtr),
      but with an additional Filter parameter constraints .

      Overrides:
      join in class QueryChain
      Parameters:
      constraints - A filter that provides any constraints for the query.
    • join

      public QueryChain join(Container containerToQuery, String key1, String key2, Container containerForResults, JoinDelegate joinDelegate)
      Same as
      join(Container,std::string,std::string,delegate::JoinDelegatePtr),
      but with an additional Container parameter containerForResults .

      Overrides:
      join in class QueryChain
      Parameters:
      containerForResults - Can be the Container from the previous query if
      desired items should be from that container.
    • join

      public QueryChain join(Container containerToQuery, String key1, String key2, Filter constraints, Container containerForResults, JoinDelegate joinDelegate)
      Same as
      join(Container,std::string,std::string,Container,delegate::JoinDelegatePtr),
      but with an additional Filter parameter constraints .

      Overrides:
      join in class QueryChain
      Parameters:
      constraints - A filter that provides any constraints for the query.
    • join

      public QueryChainExt join(Container containerToQuery, String key1, String key2)
      Performs a join request in line with function
      QueryChain::join(Container,std::string,std::string,delegate::JoinDelegatePtr)
      "join()" in class QueryChain.

      If a call to this join function is chained with a previous call to a query,
      only such a query functions accepting a
      QueryJoinDelegate can be used as:

      • CloudBackend::query(ContainerId,delegate::QueryJoinDelegatePtr)
      • CloudBackend::query(ContainerId,Filter,delegate::QueryJoinDelegatePtr)
      • Container::query(delegate::QueryJoinDelegatePtr)
      • Container::query(Filter,delegate::QueryJoinDelegatePtr)

      Asynchronous version of this service function.
      see QueryChain::join(Container,std::string,std::string,delegate::JoinDelegatePtr)
    • join

      public QueryChainExt join(Container containerToQuery, String key1, String key2, Filter constraints)
      see QueryChain::join(Container,std::string,std::string,Filter,delegate::JoinDelegatePtr)
    • join

      public QueryChainExt join(Container containerToQuery, String key1, String key2, Container containerForResults)
      see QueryChain::join(Container,std::string,std::string,Container,delegate::JoinDelegatePtr)
    • join

      public QueryChainExt join(Container containerToQuery, String key1, String key2, Filter constraints, Container containerForResults)
      see QueryChain::join(Container,std::string,std::string,Filter,Container,delegate::JoinDelegatePtr)