net.sf.jasperreports.engine

## Class CompositeDatasetFilter

- java.lang.Object
- - net.sf.jasperreports.engine.CompositeDatasetFilter

- All Implemented Interfaces:
    DatasetFilter

      public class CompositeDatasetFilter
      extends java.lang.Object
      implements DatasetFilter

  A dataset filter that wraps several other filters and applies them as a conjunction.
  Version:
    $Id: CompositeDatasetFilter.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeDatasetFilter(DatasetFilter... filters)` Creates a conjunction for several filters.
    `CompositeDatasetFilter(java.util.List<? extends DatasetFilter> filters)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DatasetFilter` | `combine(DatasetFilter filter, DatasetFilter other)` Combines two filter in a conjunction.
    `java.util.List<? extends DatasetFilter>` | `getFilters()`
    `void` | `init(DatasetFillContext context)` Initializes the filter.
    `boolean` | `matches(EvaluationType evaluation)` Determines whether the current row matches the filter criteria.
    `void` | `setFilters(java.util.List<? extends DatasetFilter> filters)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompositeDatasetFilter

          public CompositeDatasetFilter(DatasetFilter... filters)

      Creates a conjunction for several filters.
      Parameters:
        `filters` - the filters

    - #### CompositeDatasetFilter

          public CompositeDatasetFilter(java.util.List<? extends DatasetFilter> filters)

  - ### Method Detail

    - #### combine

          public static DatasetFilter combine(DatasetFilter filter,
                              DatasetFilter other)

      Combines two filter in a conjunction.
      Parameters:
        `filter` - the first filter
        `other` - the second filter

    - #### init

          public void init(DatasetFillContext context)

      Description copied from interface: `DatasetFilter`
      Initializes the filter.
      Specified by:
        `init` in interface `DatasetFilter`
      Parameters:
        `context` - dataset context information

    - #### matches

          public boolean matches(EvaluationType evaluation)

      Description copied from interface: `DatasetFilter`
      Determines whether the current row matches the filter criteria. Matching rows are included in the report, while non-matching rows are skipped.
      Specified by:
        `matches` in interface `DatasetFilter`
      Parameters:
        `evaluation` - the evaluation type. Currently only `EvaluationType.ESTIMATED` is used.
      Returns:
        `true`if the row is to be included in the report.``

    - #### getFilters

          public java.util.List<? extends DatasetFilter> getFilters()

    - #### setFilters

          public void setFilters(java.util.List<? extends DatasetFilter> filters)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com