Interface QueryBuilder

All Known Implementing Classes:
QueryBuilderImpl

@Deprecated public interface QueryBuilder
Deprecated.
A builder for creating queries in a fluent-api like style. A builder is always associated to one entity. All conditions are collected and a build(Context) creates a new Query out of the collected information.
  • Method Summary

    Modifier and Type
    Method
    Description
    build(Context context)
    Deprecated.
    Creates a query from the information supplied to this builder.
    Deprecated.
    Creates a deep copy of this builder by cloning the supplied information collected so far.
    Deprecated.
     
    orderBy(Order... order)
    Deprecated.
    Adds the given order to this builder.
    Deprecated.
    Adds the given order to this builder.
    orderBy(String orderQuery)
    Deprecated.
    Compiles the given order-by query, which is only the part after the `order by` keyword, and adds it to the list of order definitions of this query builder.
    Deprecated.
    Converts this into a query string.
    where(Condition... condition)
    Deprecated.
    Adds the specified condition to the query.
    where(Iterable<Condition> condition)
    Deprecated.
    Adds the specified condition to the query.
    where(String queryPart)
    Deprecated.
    Compiles the given query part, which is only the part after the `where` keyword and adds the result as a condition to this query builder.
    whereInsecure(Condition... condition)
    Deprecated.
    Conditions added through this method are *not* decorated with any security conditions.
    whereInsecure(String queryPart)
    Deprecated.
    Conditions added through this method are *not* decorated with any security conditions.
  • Method Details

    • getModel

      EntityModel getModel()
      Deprecated.
    • toQueryString

      String toQueryString()
      Deprecated.
      Converts this into a query string.
    • build

      Query build(Context context) throws PersistException
      Deprecated.
      Creates a query from the information supplied to this builder. This method can be invoked multiple times on the same query builder.
      Throws:
      PersistException
    • fork

      QueryBuilder fork()
      Deprecated.

      Creates a deep copy of this builder by cloning the supplied information collected so far. Any modifcations to the returned builder have no effect on this.

      Returns:
      a deep copy of this
    • where

      QueryBuilder where(Condition... condition)
      Deprecated.

      Adds the specified condition to the query. Multiple conditions added via this method are joined using the junction type specified when this builder has been created.

      This object is returned for method chaining.

      Returns:
      this
    • whereInsecure

      QueryBuilder whereInsecure(Condition... condition)
      Deprecated.
      Conditions added through this method are *not* decorated with any security conditions. User supplied conditions should never be passed to this method.
    • where

      QueryBuilder where(Iterable<Condition> condition)
      Deprecated.

      Adds the specified condition to the query. Multiple conditions added via this method are joined using the junction type specified when this builder has been created.

      This object is returned for method chaining.

      Returns:
      this
    • where

      QueryBuilder where(String queryPart)
      Deprecated.

      Compiles the given query part, which is only the part after the `where` keyword and adds the result as a condition to this query builder.

      Please use this method only if you don't know the condition at compile time. Consider the static helper class Conditions otherwise.

      Parameters:
      queryPart - a partial query defining a condition. For example `firstname == "myname" and relAddress.label ~= "*test*"`
      See Also:
    • whereInsecure

      QueryBuilder whereInsecure(String queryPart)
      Deprecated.
      Conditions added through this method are *not* decorated with any security conditions. User supplied conditions should never be passed to this method.
    • orderBy

      QueryBuilder orderBy(Order... order)
      Deprecated.
      Adds the given order to this builder. Multiple orders are added in the given order.
      Returns:
      this
    • orderBy

      QueryBuilder orderBy(Iterable<Order> order)
      Deprecated.
      Adds the given order to this builder. Multiple orders are added in the given order.
      Returns:
      this
    • orderBy

      QueryBuilder orderBy(String orderQuery) throws PersistException
      Deprecated.

      Compiles the given order-by query, which is only the part after the `order by` keyword, and adds it to the list of order definitions of this query builder.

      Please use this method only if you don't know the order-by condition at compile time. Consider the static helper class Conditions otherwise.

      Parameters:
      orderQuery - a partial query defining `order by` conditions. For example `firstname asc, relAddress.label desc`.
      Throws:
      PersistException
      See Also: