Class TableRowsFilter
java.lang.Object
org.silverpeas.components.mydb.web.TableRowsFilter
Filter of table rows by applying a
ColumnValuePredicate 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.Gets the symbol of all the comparators supported by this filter.Ges the column on which the filtering will be applied.Gets the reference field value, that is the value with which the field of all table rows in the result will be filtered.Gets the symbol of the comparator used in the filtering of the SQL query result.Gets the predicate corresponding to this filtering rule.booleanIs this filter defined?voidSets the column of the table on which the filtering will be applied.voidsetColumnValue(String value) Sets the value on which the whole column will be filtered.voidsetComparator(String comparatorSymbol) Sets the current comparator to use in the filtering of the SQL query result.
-
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.
-
setColumn
Sets the column of the table on which the filtering will be applied.- Parameters:
column- aDbColumninstance.
-
setColumnValue
Sets the value on which the whole column will be filtered.- Parameters:
value- the value on which the filtering will be applied.
-
getComparator
Gets the symbol of the comparator used in the filtering of the SQL query result.- Returns:
- the symbol of a supported comparator.
-
getColumn
Ges the column on which the filtering will be applied.- Returns:
- optionally a
DbColumninstance. If no filter was set, then returns nothing.
-
getColumnValue
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. -
isDefined
public boolean isDefined()Is this filter defined?- Returns:
- true if the filtering parameters are set, false otherwise.
-
getFilteringPredicate
Gets the predicate corresponding to this filtering rule.- Returns:
- a
ColumnValuePredicateobject. If no filtering rule is defined, returns anIdentitypredicate.
-