Class QueryBuilderImpl

java.lang.Object
ch.tocco.nice2.persist.core.impl.qb2.QueryBuilderImpl
All Implemented Interfaces:
QueryBuilder

@Deprecated public class QueryBuilderImpl extends Object implements QueryBuilder
Deprecated.
  • Constructor Details

  • Method Details

    • getModel

      public EntityModel getModel()
      Deprecated.
      Specified by:
      getModel in interface QueryBuilder
    • build

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

      public QueryBuilder fork()
      Deprecated.
      Description copied from interface: QueryBuilder

      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.

      Specified by:
      fork in interface QueryBuilder
      Returns:
      a deep copy of this
    • where

      public QueryBuilder where(String queryPart) throws PersistException
      Deprecated.
      Description copied from interface: QueryBuilder

      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.

      Specified by:
      where in interface QueryBuilder
      Parameters:
      queryPart - a partial query defining a condition. For example `firstname == "myname" and relAddress.label ~= "*test*"`
      Throws:
      PersistException
      See Also:
    • whereInsecure

      public QueryBuilder whereInsecure(String queryPart)
      Deprecated.
      Description copied from interface: QueryBuilder
      Conditions added through this method are *not* decorated with any security conditions. User supplied conditions should never be passed to this method.
      Specified by:
      whereInsecure in interface QueryBuilder
    • where

      public QueryBuilder where(Condition... condition)
      Deprecated.
      Description copied from interface: QueryBuilder

      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.

      Specified by:
      where in interface QueryBuilder
      Returns:
      this
    • whereInsecure

      public QueryBuilder whereInsecure(Condition... conditions)
      Deprecated.
      Description copied from interface: QueryBuilder
      Conditions added through this method are *not* decorated with any security conditions. User supplied conditions should never be passed to this method.
      Specified by:
      whereInsecure in interface QueryBuilder
    • where

      public QueryBuilder where(Iterable<Condition> conditions)
      Deprecated.
      Description copied from interface: QueryBuilder

      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.

      Specified by:
      where in interface QueryBuilder
      Returns:
      this
    • orderBy

      public QueryBuilder orderBy(Order... order)
      Deprecated.
      Description copied from interface: QueryBuilder
      Adds the given order to this builder. Multiple orders are added in the given order.
      Specified by:
      orderBy in interface QueryBuilder
      Returns:
      this
    • orderBy

      public QueryBuilder orderBy(String orderQuery) throws PersistException
      Deprecated.
      Description copied from interface: QueryBuilder

      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.

      Specified by:
      orderBy in interface QueryBuilder
      Parameters:
      orderQuery - a partial query defining `order by` conditions. For example `firstname asc, relAddress.label desc`.
      Throws:
      PersistException
      See Also:
    • toQueryString

      public String toQueryString()
      Deprecated.
      Description copied from interface: QueryBuilder
      Converts this into a query string.
      Specified by:
      toQueryString in interface QueryBuilder
    • orderBy

      public QueryBuilder orderBy(Iterable<Order> order)
      Deprecated.
      Description copied from interface: QueryBuilder
      Adds the given order to this builder. Multiple orders are added in the given order.
      Specified by:
      orderBy in interface QueryBuilder
      Returns:
      this
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class Object