Class TableRowsFilter


  • public class TableRowsFilter
    extends Object
    Filter of table rows by applying a ColumnValuePredicate predicate on them.
    Author:
    mmoquillon
    • Field Detail

      • FIELD_NONE

        public static final String FIELD_NONE
        Default value when no comparator or no field name are set.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TableRowsFilter

        public TableRowsFilter()
    • Method Detail

      • getAllComparators

        public static Set<String> getAllComparators()
        Gets the symbol of all of the comparators supported by this filter.
        Returns:
        a set of comparator symbols.
      • setComparator

        public void setComparator​(String comparatorSymbol)
        Sets the current comparator to use in the filtering of the SQL query result.
        Parameters:
        comparatorSymbol - the symbol of a supported comparator.
      • setColumn

        public void setColumn​(DbColumn column)
        Sets the column of the table on which the filtering will be applied.
        Parameters:
        column - a DbColumn instance.
      • setColumnValue

        public void setColumnValue​(String value)
        Sets the value on which the whole column will be filtered.
        Parameters:
        value - the value on which the filtering will be applied.
      • getComparator

        public String getComparator()
        Gets the symbol of the comparator used in the filtering of the SQL query result.
        Returns:
        the symbol of a supported comparator.
      • getColumn

        public Optional<DbColumn> getColumn()
        Ges the column on which the filtering will be applied.
        Returns:
        optionally a DbColumn instance. If no filter was set, then returns nothing.
      • getColumnValue

        public String 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 String instance.
      • 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.