Holger's Java API

## com.antelmann.sql
Class SQLMapFilter<T>

    java.lang.Object
      com.antelmann.sql.SQLMapFilter<T>

All Implemented Interfaces:
  SQLComboFilterSupported<T>, CascadingFilter<T>, Filter<T>, Serializable

    public class SQLMapFilter<T>

extends Object
implements CascadingFilter<T>, Serializable, SQLComboFilterSupported<T>

a special filter that can be used to easily pre-filter Resources via restrictions used in a ConnectionHelper (to fetch them from a DBClassStore).

Since:
  12. Dezember 2006, 16:43
Author:
  Holger Antelmann
See Also:
  `SQLConstraint`, `BaseRowMapper`, `JDBCRowStore`, `DBEntry`, `ConnectionHelper.filterTable(String, Map)`, `ConnectionHelper.filterTable(String, Map, boolean, int, int, String...)`, `SQLDirectQueryEntryFilter`, `SQLStubFilter`, `SQLComboFilter`, Serialized Form

Field Summary

Fields inherited from interface com.antelmann.util.Filter
`EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER`

Constructor Summary
`SQLMapFilter()`
`SQLMapFilter(Map<String,Object> sqlFilterMap, Filter<? super T> internalFilter, String... orderByColumns)` the given map is directly used as the embedded map
`SQLMapFilter(Map<String,Object> sqlFilterMap, String... orderByColumns)` if a column is to be sorted descending, put a minus sign before the column name
`SQLMapFilter(String key, Object value)`
`SQLMapFilter(String key, Object value, String... orderByColumns)`

Method Summary
`boolean` `accept(T entry)` return value based on the internal filter - or returns null if the internal filter is null
`Filter<? super T>` `getInnerFilter()` returns the internal filter that applies in this instance's accept() method
`String[]` `getOrder()`
`Map<String,Object>` `getSQLFilterMap()` gives direct access to the embedded map, which may be null if constructed directly with a query String
`boolean` `isCombineWithAnd()` true by default
`void` `setCombineWithAnd(boolean flag)`
`void` `setInnerFilter(Filter<? super T> internalFilter)`
`void` `setOrder(String... orderByColumns)`
`SQLStubFilter` `toStubFilter()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLMapFilter

    public SQLMapFilter()

### SQLMapFilter

    public SQLMapFilter(String key,
                        Object value)

### SQLMapFilter

    public SQLMapFilter(String key,
                        Object value,
                        String... orderByColumns)

### SQLMapFilter

    public SQLMapFilter(Map<String,Object> sqlFilterMap,
                        String... orderByColumns)

  if a column is to be sorted descending, put a minus sign before the column name

### SQLMapFilter

    public SQLMapFilter(Map<String,Object> sqlFilterMap,
                        Filter<? super T> internalFilter,
                        String... orderByColumns)

  the given map is directly used as the embedded map

Method Detail

### getSQLFilterMap

    public Map<String,Object> getSQLFilterMap()

  gives direct access to the embedded map, which may be null if constructed directly with a query String

### setInnerFilter

    public void setInnerFilter(Filter<? super T> internalFilter)

  Specified by:
    `setInnerFilter` in interface `CascadingFilter<T>`

### getInnerFilter

    public Filter<? super T> getInnerFilter()

  returns the internal filter that applies in this instance's accept() method

  Specified by:
    `getInnerFilter` in interface `CascadingFilter<T>`

### getOrder

    public String[] getOrder()

### setOrder

    public void setOrder(String... orderByColumns)

### isCombineWithAnd

    public boolean isCombineWithAnd()

  true by default

### setCombineWithAnd

    public void setCombineWithAnd(boolean flag)

### accept

    public boolean accept(T entry)

  return value based on the internal filter - or returns null if the internal filter is null

  Specified by:
    `accept` in interface `Filter<T>`

### toStubFilter

    public SQLStubFilter toStubFilter()
                               throws InconsistentContentException

  Throws:
    `InconsistentContentException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads