Class FieldFilter
- java.lang.Object
-
- net.sf.jasperreports.components.util.FieldFilter
-
- All Implemented Interfaces:
DatasetFilter
public class FieldFilter extends Object implements DatasetFilter
A dataset filter that matches String values based on substrings.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Constructor Summary
Constructors Constructor Description FieldFilter()
FieldFilter(String field, String filterValueStart, String filterValueEnd, String filterType, String filterTypeOperator)
Creates a field filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getField()
protected Locale
getFilterLocale()
String
getFilterPattern()
protected TimeZone
getFilterTimeZone()
String
getFilterType()
FilterTypesEnum
getFilterTypeEnum()
String
getFilterTypeOperator()
String
getFilterValueEnd()
String
getFilterValueStart()
Boolean
getIsField()
Boolean
getIsValid()
String
getLocaleCode()
String
getTimeZoneId()
void
init(DatasetFillContext context)
Initializes the filter.boolean
matches(EvaluationType evaluation)
Determines whether the current row matches the filter criteria.void
setFilterPattern(String filterPattern)
void
setFilterTypeOperator(String filterTypeOperator)
void
setFilterValueEnd(String filterValueEnd)
void
setFilterValueStart(String filterValueStart)
void
setIsField(Boolean isField)
void
setIsValid(Boolean isValid)
void
setLocaleCode(String localeCode)
void
setTimeZoneId(String timeZoneId)
-
-
-
Method Detail
-
init
public void init(DatasetFillContext context)
Description copied from interface:DatasetFilter
Initializes the filter.- Specified by:
init
in interfaceDatasetFilter
- Parameters:
context
- dataset context information
-
getFilterLocale
protected Locale getFilterLocale()
-
getFilterTimeZone
protected TimeZone getFilterTimeZone()
-
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.
-
getField
public String getField()
-
getFilterValueStart
public String getFilterValueStart()
-
setFilterValueStart
public void setFilterValueStart(String filterValueStart)
-
getFilterValueEnd
public String getFilterValueEnd()
-
setFilterValueEnd
public void setFilterValueEnd(String filterValueEnd)
-
getFilterType
public String getFilterType()
-
getFilterTypeOperator
public String getFilterTypeOperator()
-
setFilterTypeOperator
public void setFilterTypeOperator(String filterTypeOperator)
-
getFilterTypeEnum
public FilterTypesEnum getFilterTypeEnum()
-
getIsValid
public Boolean getIsValid()
-
setIsValid
public void setIsValid(Boolean isValid)
-
getIsField
public Boolean getIsField()
-
setIsField
public void setIsField(Boolean isField)
-
getFilterPattern
public String getFilterPattern()
-
setFilterPattern
public void setFilterPattern(String filterPattern)
-
getLocaleCode
public String getLocaleCode()
-
setLocaleCode
public void setLocaleCode(String localeCode)
-
getTimeZoneId
public String getTimeZoneId()
-
setTimeZoneId
public void setTimeZoneId(String timeZoneId)
-
-