Module is.codion.common.model
Package is.codion.common.model.condition
Interface TableConditionModel<C>
- Type Parameters:
C
- the condition identifier type
- All Known Subinterfaces:
EntityConditionModel
public interface TableConditionModel<C>
Manages a set of
ConditionModel
s for table columns.- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Responsible for creatingConditionModel
instances. -
Method Summary
Modifier and TypeMethodDescriptionObserver<?>
changed()
void
clear()
Clears the search state of all the condition models, disables them and resets the operator toOperator.EQUAL
enabled()
Map<C,
ConditionModel<?>> get()
<T> ConditionModel<T>
The condition model associated withidentifier
<T> Optional<ConditionModel<T>>
The condition model associated withidentifier
static <C> TableConditionModel<C>
tableConditionModel
(Map<C, ConditionModel<?>> conditions) Instantiates a newTableConditionModel
-
Method Details
-
get
Map<C,ConditionModel<?>> get()- Returns:
- an unmodifiable view of the available condition models
-
get
The condition model associated withidentifier
- Type Parameters:
T
- the condition value type- Parameters:
identifier
- the identifier for which to retrieve theConditionModel
- Returns:
- the
ConditionModel
associated with the given identifier - Throws:
IllegalArgumentException
- in case no condition model exists for the given identifier
-
optional
The condition model associated withidentifier
- Type Parameters:
T
- the condition value type- Parameters:
identifier
- the identifier for which to retrieve theConditionModel
- Returns:
- the
ConditionModel
for theidentifier
or an empty Optional in case one is not available
-
clear
void clear()Clears the search state of all the condition models, disables them and resets the operator toOperator.EQUAL
-
enabled
StateObserver enabled()- Returns:
- a
StateObserver
enabled when any of the underlying condition models are enabled
-
changed
Observer<?> changed()- Returns:
- an observer notified each time the condition changes
-
tableConditionModel
Instantiates a newTableConditionModel
- Type Parameters:
C
- the condition identifier type- Parameters:
conditions
- the condition models mapped to their respective column identifiers- Returns:
- a new
TableConditionModel
-