Module is.codion.framework.model
Package is.codion.framework.model
Class AbstractForeignKeyConditionModel
java.lang.Object
is.codion.framework.model.AbstractForeignKeyConditionModel
- All Implemented Interfaces:
ColumnConditionModel<ForeignKey,
Entity>
- Direct Known Subclasses:
EntityComboBoxConditionModel
,EntitySearchConditionModel
public abstract class AbstractForeignKeyConditionModel
extends Object
implements ColumnConditionModel<ForeignKey,Entity>
An abstract base class for
ForeignKey
based ColumnConditionModel
s.-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.model.table.ColumnConditionModel
ColumnConditionModel.AutomaticWildcard, ColumnConditionModel.Builder<C,
T>, ColumnConditionModel.Factory<C> -
Field Summary
Fields inherited from interface is.codion.common.model.table.ColumnConditionModel
AUTOMATIC_WILDCARD, CASE_SENSITIVE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
accepts
(Comparable<Entity> columnValue) Returns true if the given value is accepted by this models condition.final State
Note that this is only applicable to string based condition models and only used for operatorsOperator.EQUAL
andOperator.NOT_EQUAL
final State
final void
clear()
Disables and clears this condition model, that is, sets the upper and lower bounds to null and the operator to the default valueOperator.EQUAL
final ForeignKey
final EventObserver<?>
final String
final State
enabled()
final Format
format()
final Entity
final Collection<Entity>
final Entity
final Entity
final State
locked()
operator()
final void
setEqualValue
(Entity value) Sets the values used when theOperator.EQUAL
is enabled.final void
setEqualValues
(Collection<Entity> values) final void
setLowerBound
(Entity value) final void
setUpperBound
(Entity value) final char
wildcard()
-
Constructor Details
-
AbstractForeignKeyConditionModel
-
-
Method Details
-
columnIdentifier
- Specified by:
columnIdentifier
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the column identifier
-
caseSensitive
- Specified by:
caseSensitive
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the State controlling whether this model is case-sensitive, when working with strings
-
format
- Specified by:
format
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the Format object to use when formatting input, if any
-
dateTimePattern
- Specified by:
dateTimePattern
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the date/time format pattern, if any
-
locked
- Specified by:
locked
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the state controlling the locked status
-
columnClass
- Specified by:
columnClass
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the column class this condition model is based on
-
setEqualValue
Description copied from interface:ColumnConditionModel
Sets the values used when theOperator.EQUAL
is enabled.- Specified by:
setEqualValue
in interfaceColumnConditionModel<ForeignKey,
Entity> - Parameters:
value
- the value to use as condition
-
getEqualValue
- Specified by:
getEqualValue
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the equal value, possibly null
-
setEqualValues
- Specified by:
setEqualValues
in interfaceColumnConditionModel<ForeignKey,
Entity> - Parameters:
values
- the values to set, an empty Collection for none
-
getEqualValues
- Specified by:
getEqualValues
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the equal values, never null
-
setUpperBound
- Specified by:
setUpperBound
in interfaceColumnConditionModel<ForeignKey,
Entity> - Parameters:
value
- the new upper bound
-
getUpperBound
- Specified by:
getUpperBound
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the upper bound
-
setLowerBound
- Specified by:
setLowerBound
in interfaceColumnConditionModel<ForeignKey,
Entity> - Parameters:
value
- the lower bound
-
getLowerBound
- Specified by:
getLowerBound
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the lower bound
-
operator
- Specified by:
operator
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- a Value based on the operator
-
operators
- Specified by:
operators
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the operators available in this condition model
-
wildcard
public final char wildcard()- Specified by:
wildcard
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the character used as a wildcard when working with strings
-
enabled
- Specified by:
enabled
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- a state controlling the enabled status
-
automaticWildcard
Description copied from interface:ColumnConditionModel
Note that this is only applicable to string based condition models and only used for operatorsOperator.EQUAL
andOperator.NOT_EQUAL
- Specified by:
automaticWildcard
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the Value controlling whether automatic wildcards are enabled when working with strings
-
autoEnable
- Specified by:
autoEnable
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- the
State
controlling whether this model is enabled automatically when a condition value is specified
-
clear
public final void clear()Description copied from interface:ColumnConditionModel
Disables and clears this condition model, that is, sets the upper and lower bounds to null and the operator to the default valueOperator.EQUAL
- Specified by:
clear
in interfaceColumnConditionModel<ForeignKey,
Entity>
-
accepts
Description copied from interface:ColumnConditionModel
Returns true if the given value is accepted by this models condition.- Specified by:
accepts
in interfaceColumnConditionModel<ForeignKey,
Entity> - Parameters:
columnValue
- the column value- Returns:
- true if the given value is accepted by this models condition
-
equalValues
- Specified by:
equalValues
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- a ValueSet based on the equals values of this condition model
-
lowerBoundValue
- Specified by:
lowerBoundValue
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- a Value based on the lower bound value of this condition model
-
upperBoundValue
- Specified by:
upperBoundValue
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- a Value based on the upper bound value of this condition model
-
conditionChangedEvent
- Specified by:
conditionChangedEvent
in interfaceColumnConditionModel<ForeignKey,
Entity> - Returns:
- an observer notified each time the condition state changes
-