com.holonplatform.datastore.jdbc.composer

## Interface WhereFilter

- All Superinterfaces:
    com.holonplatform.core.Expression, com.holonplatform.core.query.QueryFilter, Serializable

      public interface WhereFilter
      extends com.holonplatform.core.query.QueryFilter

  A `QueryFilter` which uses a SQL where predicate to express query filter conditions.

  This filter supports query parameters, which must be expressed in SQL statement using the default `?` placeholder. The parameter placeholders will be replaced with the values obtained from the `getParameters()` method.

  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.query.QueryFilter

      `com.holonplatform.core.query.QueryFilter.CompositeQueryFilter, com.holonplatform.core.query.QueryFilter.QueryFilterResolver<T extends com.holonplatform.core.query.QueryFilter>, com.holonplatform.core.query.QueryFilter.QueryFilterSupport<C extends com.holonplatform.core.query.QueryFilter.QueryFilterSupport<C>>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Expression

      `com.holonplatform.core.Expression.ExpressionResolverFunction<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>, com.holonplatform.core.Expression.InvalidExpressionException`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static WhereFilter` | `create(String sql, Object... parameters)` Create a `WhereFilter` using given `sql` predicate.
    `List<Object>` | `getParameters()` Get the optional sql parameter values.
    `String` | `getSQL()` Get the where predicate as sql.

    - ### Methods inherited from interface com.holonplatform.core.query.QueryFilter

      `allOf, allOf, and, anyOf, anyOf, between, contains, endsWith, eq, eq, goe, goe, greaterThan, greaterThan, gt, gt, in, in, in, isNotNull, isNull, lessThan, lessThan, loe, loe, lt, lt, neq, neq, nin, nin, nin, not, not, or, startsWith`

    - ### Methods inherited from interface com.holonplatform.core.Expression

      `validate`

- - ### Method Detail

    - #### getSQL

          String getSQL()

      Get the where predicate as sql.

      NOTE: The `WHERE` clause string should not be included.

      Returns:
        Predicate sql

    - #### getParameters

          List<Object> getParameters()

      Get the optional sql parameter values.
      Returns:
        the sql parameter values, an empty list if none

    - #### create

          static WhereFilter create(String sql,
                                    Object... parameters)

      Create a `WhereFilter` using given `sql` predicate.
      Parameters:
        `sql` - Filter sql predicate (not null)
        `parameters` - Optional parameters. The parameter values will be used to replace the SQL statement `?` placeholders, in the order they are given.
      Returns:
        A new `WhereFilter`

Copyright © 2019 The Holon Platform. All rights reserved.