com.holonplatform.datastore.jdbc.composer.internal

## Class DefaultWhereFilter

- java.lang.Object
- - com.holonplatform.datastore.jdbc.composer.internal.DefaultWhereFilter

- All Implemented Interfaces:
    com.holonplatform.core.Expression, com.holonplatform.core.query.QueryFilter, WhereFilter, Serializable

      public class DefaultWhereFilter
      extends Object
      implements WhereFilter

  Default `WhereFilter` implementation.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### 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`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultWhereFilter(String sql)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParameter(Object parameter)` Add a parameter value.
    `List<Object>` | `getParameters()` Get the optional sql parameter values.
    `String` | `getSQL()` Get the where predicate as sql.
    `String` | `toString()`
    `void` | `validate()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.datastore.jdbc.composer.WhereFilter

      `create`

    - ### 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`

- - ### Constructor Detail

    - #### DefaultWhereFilter

          public DefaultWhereFilter(String sql)

      Constructor.
      Parameters:
        `sql` - The SQL filter predicate

  - ### Method Detail

    - #### getSQL

          public String getSQL()

      Description copied from interface: `WhereFilter`
      Get the where predicate as sql.

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

      Specified by:
        `getSQL` in interface `WhereFilter`
      Returns:
        Predicate sql

    - #### getParameters

          public List<Object> getParameters()

      Description copied from interface: `WhereFilter`
      Get the optional sql parameter values.
      Specified by:
        `getParameters` in interface `WhereFilter`
      Returns:
        the sql parameter values, an empty list if none

    - #### addParameter

          public void addParameter(Object parameter)

      Add a parameter value.
      Parameters:
        `parameter` - Parameter value to add (not null)

    - #### validate

          public void validate()
                        throws com.holonplatform.core.Expression.InvalidExpressionException

      Specified by:
        `validate` in interface `com.holonplatform.core.Expression`
      Throws:
        `com.holonplatform.core.Expression.InvalidExpressionException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019 The Holon Platform. All rights reserved.