Package net.sf.jasperreports.engine
Class CompositeDatasetFilter
- java.lang.Object
-
- net.sf.jasperreports.engine.CompositeDatasetFilter
-
- All Implemented Interfaces:
DatasetFilter
public class CompositeDatasetFilter extends Object implements DatasetFilter
A dataset filter that wraps several other filters and applies them as a conjunction.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description CompositeDatasetFilter(List<? extends DatasetFilter> filters)
CompositeDatasetFilter(DatasetFilter... filters)
Creates a conjunction for several filters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DatasetFilter
combine(DatasetFilter filter, DatasetFilter other)
Combines two filter in a conjunction.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(List<? extends DatasetFilter> filters)
-
-
-
Constructor Detail
-
CompositeDatasetFilter
public CompositeDatasetFilter(DatasetFilter... filters)
Creates a conjunction for several filters.- Parameters:
filters
- the filters
-
CompositeDatasetFilter
public CompositeDatasetFilter(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 filterother
- the second filter
-
init
public void init(DatasetFillContext context)
Description copied from interface:DatasetFilter
Initializes the filter.- Specified by:
init
in interfaceDatasetFilter
- 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 interfaceDatasetFilter
- Parameters:
evaluation
- the evaluation type. Currently onlyEvaluationType.ESTIMATED
is used.- Returns:
true
if the row is to be included in the report.
-
getFilters
public List<? extends DatasetFilter> getFilters()
-
setFilters
public void setFilters(List<? extends DatasetFilter> filters)
-
-