Public Member Functions | |
LogTableRowFilter (FiltersVector filtersVector, LogTypeHelper logLevel) | |
Override boolean | include (Entry<?extends LogTableDataModel,?extends Integer > entry) |
Private Member Functions | |
void | buildTableFilters (FiltersVector userFilters) |
boolean | checkLogLevel (LogTypeHelper level) |
Private Attributes | |
Filter[] | filters = null |
LogTypeHelper | logLevel = LogTypeHelper.TRACE |
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.
|
Constructor
|
|
Convert the vector of filters to a
The engine and the dialog define filters by means of a vector of filters that has to be converted before being applied by this sorter. If the vector of filters is null or empty this object is set to
|
|
Check if the level of the log passed as parameter matches with the log level
|
|
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:
The filtering is done by getting the value to check against the filter from the column (index) containing it in
Once we have the filter and the value to filter, we can use
|
|
The array with the filters to apply to the entries.
This array is null but when there are filters. In this case, it contains anly the active filters read from the |
|
The log level.
All the entries whose level is less then |