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>
- See Also:
-
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()
<T> ConditionModel<C,
T> The condition model associated withidentifier
<T> Optional<ConditionModel<C,
T>> The condition model associated withidentifier
static <C> TableConditionModel<C>
tableConditionModel
(Collection<ConditionModel<C, ?>> conditionModels) Instantiates a newTableConditionModel
-
Method Details
-
identifiers
Collection<C> identifiers()- Returns:
- the available condition model identifiers
-
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
for theidentifier
- 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
static <C> TableConditionModel<C> tableConditionModel(Collection<ConditionModel<C, ?>> conditionModels) Instantiates a newTableConditionModel
- Type Parameters:
C
- the condition identifier type- Parameters:
conditionModels
- the condition models- Returns:
- a new
TableConditionModel
-