Public Member Functions

alma.acs.logging.table.LogTableRowFilter Class Reference

Inherits javax::swing::RowFilter< LogTableDataModel, Integer >.

List of all members.

Public Member Functions

 LogTableRowFilter (FiltersVector filtersVector, LogTypeHelper logLevel)
boolean include (Entry<?extends LogTableDataModel,?extends Integer > entry)

Detailed Description

The filters used to hide/show logs in the table.

The filters defined in the FiltersVector are entirely reused by this object. To enhance performances only the active filters are stored into an array built by the constructor. All the magic happens in the include method where the filters are compared against the values of a row of the table.

Author:
acaproni

Constructor & Destructor Documentation

alma.acs.logging.table.LogTableRowFilter.LogTableRowFilter ( FiltersVector  filtersVector,
LogTypeHelper  logLevel 
)

Constructor

Parameters:
filtersVector The vector of engine filters (can be null or empty)
logLevel The log level of the logs to filter out

Member Function Documentation

boolean alma.acs.logging.table.LogTableRowFilter.include ( Entry<?extends LogTableDataModel,?extends Integer >  entry  ) 

Compare the entry with the filters.

The entry represents a row of the table and it is possible to get the values of all the cells of the row using an index. The order of the columns is independent of the way the appear in the table and therefore is like this:

  1. - Boolean (has data)
  2. - LogField.TIMESTAMP
  3. - LogField.ENTRYTYPE
  4. - ..

The filtering is done by getting the value to check against the filter from the column (index) containing it in entry. It is possible to know which field a filter wants to filter by reading the Filter.field property.

Once we have the filter and the value to filter, we can use filter.applyTo(Object obj) method to check if the row matches the filter.

Parameters:
entry The entry to check against filters
Returns:
true if the entry passed the filters and must be displayed in the table
See also:
RowFilter.include

References com.cosylab.logging.engine.Filter.applyTo(), and com.cosylab.logging.engine.Filter.field.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties