java.lang.Object
is.codion.framework.model.ForeignKeyConditionModel
- All Implemented Interfaces:
ConditionModel<Entity>
A default foreign key condition model using
EntitySearchModel
for
both the Operator.EQUAL
and Operator.IN
operands.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.model.condition.ConditionModel
ConditionModel.Operands<T>, ConditionModel.Wildcard
-
Field Summary
Fields inherited from interface is.codion.common.model.condition.ConditionModel
CASE_SENSITIVE, WILDCARD
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts
(Comparable<Entity> value) Returns true if the given value is accepted by this models condition.builder()
Observer<?>
changed()
void
clear()
Clears this condition model, that is, clears all operands and sets the operator to the initial one.enabled()
format()
locked()
operands()
operator()
wildcard()
Note that this is only applicable to string based condition models and only used for operatorsOperator.EQUAL
andOperator.NOT_EQUAL
-
Method Details
-
equalSearchModel
- Returns:
- the combo box model controlling the equal value
- Throws:
IllegalStateException
- in case no such model is available
-
inSearchModel
- Returns:
- the search model controlling the in values
- Throws:
IllegalStateException
- in case no such model is available
-
caseSensitive
- Specified by:
caseSensitive
in interfaceConditionModel<Entity>
- Returns:
- the
State
controlling whether this model is case-sensitive, when working with strings
-
format
- Specified by:
format
in interfaceConditionModel<Entity>
- Returns:
- the Format object to use when formatting input, an empty Optional in case none is available
-
dateTimePattern
- Specified by:
dateTimePattern
in interfaceConditionModel<Entity>
- Returns:
- the date/time format pattern, if any
-
wildcard
Description copied from interface:ConditionModel
Note that this is only applicable to string based condition models and only used for operatorsOperator.EQUAL
andOperator.NOT_EQUAL
- Specified by:
wildcard
in interfaceConditionModel<Entity>
- Returns:
- the
Mutable
controlling whether wildcards are added to strings
-
autoEnable
- Specified by:
autoEnable
in interfaceConditionModel<Entity>
- Returns:
- the
State
controlling whether this model is enabled automatically when a condition value is specified
-
locked
- Specified by:
locked
in interfaceConditionModel<Entity>
- Returns:
- the
State
controlling the locked status
-
valueClass
- Specified by:
valueClass
in interfaceConditionModel<Entity>
- Returns:
- the value class this condition model is based on
-
operators
- Specified by:
operators
in interfaceConditionModel<Entity>
- Returns:
- the operators available in this condition model
-
enabled
- Specified by:
enabled
in interfaceConditionModel<Entity>
- Returns:
- a state controlling the enabled status
-
clear
public void clear()Description copied from interface:ConditionModel
Clears this condition model, that is, clears all operands and sets the operator to the initial one.- Specified by:
clear
in interfaceConditionModel<Entity>
- See Also:
-
operator
- Specified by:
operator
in interfaceConditionModel<Entity>
- Returns:
- a
Value
controlling on the operator
-
operands
- Specified by:
operands
in interfaceConditionModel<Entity>
- Returns:
- the operands
-
accepts
Description copied from interface:ConditionModel
Returns true if the given value is accepted by this models condition.- Specified by:
accepts
in interfaceConditionModel<Entity>
- Parameters:
value
- the value- Returns:
- true if the given value is accepted by this models condition
-
changed
- Specified by:
changed
in interfaceConditionModel<Entity>
- Returns:
- an observer notified each time the condition changes
-
builder
- Returns:
- a new
ForeignKeyConditionModel.Builder
-