Class AbstractFilter<T>
java.lang.Object
com.inductiveautomation.ignition.common.alarming.query.AbstractFilter<T>
- Type Parameters:
T
- The type of object that gets filtered
- All Implemented Interfaces:
Condition<T>
,Filter<T>
,Serializable
- Direct Known Subclasses:
AlarmFilter
,TagQuery
The base implementation of a filter. A filter, simply put, is a group of conditions that operate against a type T. It
can answer "does this T value match our conditions".
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRawCondition
(Field<?, ?, ?> f, Condition<?> condition) <F extends AbstractFilter<T>,
V, C extends Condition<V>>
Fboolean
<V,
C extends Condition<V>>
CgetConditionFor
(Field<T, V, C> field) Returns the condition for the field, or null if it doesn't exist.protected abstract LoggerEx
boolean
hasConditionFor
(Field<T, ?, ?> field) Returns whether the filter has a condition for the field.int
hashCode()
boolean
isOptimized
(Field<?, ?, ?> field) protected void
logCondition
(Condition<?> c, Object value, boolean passed) Can be overridden to log success/failure conditions.void
markOptimized
(Field<?, ?, ?> field) If the query implementation knows how to specially optimize the condition for a certain field, it can mark it here and prevent it from being checked again as part of the filter process.boolean
Returns whether the provided value passes the condition.void
removeCondition
(Field<T, ?, ?> field) void
toString()
-
Constructor Details
-
AbstractFilter
public AbstractFilter()
-
-
Method Details
-
getLogger
-
passes
Description copied from interface:Condition
Returns whether the provided value passes the condition. -
hasConditionFor
Description copied from interface:Filter
Returns whether the filter has a condition for the field.- Specified by:
hasConditionFor
in interfaceFilter<T>
-
getConditionFor
Description copied from interface:Filter
Returns the condition for the field, or null if it doesn't exist.- Specified by:
getConditionFor
in interfaceFilter<T>
-
isOptimized
-
resetOptimized
public void resetOptimized() -
markOptimized
If the query implementation knows how to specially optimize the condition for a certain field, it can mark it here and prevent it from being checked again as part of the filter process. -
and
public <F extends AbstractFilter<T>,V, F andC extends Condition<V>> (Field<T, V, C> field, C condition) -
addRawCondition
-
getRawConditions
-
logCondition
Can be overridden to log success/failure conditions. -
removeCondition
-
toString
-
equals
-
hashCode
public int hashCode()
-