Interface FilterableStatement<T,S extends FilterableStatement<T,?>>

All Superinterfaces:
CqnFilterableStatement, CqnStatement, JSONizable, Statement<S>
All Known Subinterfaces:
Delete<T>, Update<T>
All Known Implementing Classes:
Select

public interface FilterableStatement<T,S extends FilterableStatement<T,?>> extends Statement<S>, CqnFilterableStatement
  • Method Details

    • where

      S where(CqnPredicate predicate)
      Sets the where condition of this filterable statement to a given predicate. If this filterable statement already has a where condition it is replaced with the given.
      Parameters:
      predicate - a CqnPredicate
      Returns:
      the filterable statement
    • where

      S where(Function<T,CqnPredicate> predicate)
      Sets the where condition of this filterable statement. The where condition is provided as a function that accepts a model object representing the entity targeted by the filterable and returning the where condition.
      Parameters:
      predicate - a Function providing the where condition
      Returns:
      the filterable statement
    • matching

      S matching(Map<String,?> values)
      Sets the where condition of the filterable statement. The where condition is computed from a map of element names of the target entity set to their values, or a CqnParameter. The map entries are transformed into comparison predicates and joined via and.
      Parameters:
      values - the element name to value map defining the where condition
      Returns:
      the filterable statement
    • byParams

      S byParams(String... elementRefs)
      Sets the where condition of the filterable statement. The where condition is computed from the given vararg of element references of the target entity. For each element reference a predicate is created comparing the element ref with a CqnParameter that has the name of the ref. The predicates are joined via and.
      Parameters:
      elementRefs - the element references defining the where condition
      Returns:
      this filterable statement
    • byParams

      S byParams(Collection<String> elementRefs)
      Sets the where condition of the filterable statement. The where condition is computed from the given collection of element references of the target entity. For each element ref a predicate is created comparing the ref with a CqnParameter that has the name of the ref. The predicates are joined via and.
      Parameters:
      elementRefs - the element references defining the where condition
      Returns:
      this filterable statement
    • byId

      S byId(Object idValue)
      Sets the where condition of the filterable statement, requiring that the value of the single key element of the target entity set is equal to the given idValue.
      Parameters:
      idValue - the value of the target entity's key element
      Returns:
      the filterable statement