Class TableRowsFilter
java.lang.Object
org.silverpeas.components.jdbcconnector.control.TableRowsFilter
Filter of table rows by applying a
FieldValueComparator predicate on them.- Author:
- mmoquillon
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault value when no comparator or no field name are set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all the filtering parameters used by this filter.Filters the specified table rows by applying the underlying filtering parameters that were set by the setters.Gets the symbol of all the comparators supported by this filter.Gets the symbol of the comparator used in the filtering of the SQL query result.Gets the name of the field to filter.Gets the reference field value, that is the value with which the field of all table rows in the result will be filtered.voidsetComparator(String comparatorSymbol) Sets the current comparator to use in the filtering of the SQL query result.voidsetFieldName(String fieldName, Class<?> fieldType) Sets the name of the field, and its concrete type, in each table row of a result to filter.voidsetFieldValue(String fieldValue) Sets the value with which a field of all the table row will be filtered.
-
Field Details
-
FIELD_NONE
Default value when no comparator or no field name are set.- See Also:
-
-
Constructor Details
-
TableRowsFilter
public TableRowsFilter()
-
-
Method Details
-
getAllComparators
Gets the symbol of all the comparators supported by this filter.- Returns:
- a set of comparator symbols.
-
setComparator
Sets the current comparator to use in the filtering of the SQL query result.- Parameters:
comparatorSymbol- the symbol of a supported comparator.
-
setFieldName
Sets the name of the field, and its concrete type, in each table row of a result to filter.- Parameters:
fieldName- the name of a field in the table rows of a SQL query result.fieldType- the concrete type of the field.
-
setFieldValue
Sets the value with which a field of all the table row will be filtered.- Parameters:
fieldValue- the value with which the field of each table row will be compared.
-
getComparator
Gets the symbol of the comparator used in the filtering of the SQL query result.- Returns:
- the symbol of a supported comparator.
-
getFieldName
Gets the name of the field to filter.- Returns:
- a field name.
-
getFieldValue
Gets the reference field value, that is the value with which the field of all table rows in the result will be filtered.- Returns:
- the value used in the filtering as a
Stringinstance.
-
clear
public void clear()Clears all the filtering parameters used by this filter. -
filter
Filters the specified table rows by applying the underlying filtering parameters that were set by the setters.- Parameters:
rows- the rows to filter.- Returns:
- a list with all the table rows filtered according to the underlying filtering parameters.
-