K
- the type of the column identifierpublic class DefaultColumnConditionModel<K> extends java.lang.Object implements ColumnConditionModel<K>
ColumnConditionModel.AutomaticWildcard
AUTOMATIC_WILDCARD, CASE_SENSITIVE
Constructor and Description |
---|
DefaultColumnConditionModel(K columnIdentifier,
java.lang.Class typeClass,
java.lang.String wildcard)
Instantiates a DefaultColumnConditionModel.
|
DefaultColumnConditionModel(K columnIdentifier,
java.lang.Class typeClass,
java.lang.String wildcard,
java.text.Format format,
java.lang.String dateTimeFormatPattern)
Instantiates a DefaultColumnConditionModel.
|
DefaultColumnConditionModel(K columnIdentifier,
java.lang.Class typeClass,
java.lang.String wildcard,
java.text.Format format,
java.lang.String dateTimeFormatPattern,
ColumnConditionModel.AutomaticWildcard automaticWildcard)
Instantiates a DefaultColumnConditionModel.
|
DefaultColumnConditionModel(K columnIdentifier,
java.lang.Class typeClass,
java.lang.String wildcard,
java.text.Format format,
java.lang.String dateTimeFormatPattern,
ColumnConditionModel.AutomaticWildcard automaticWildcard,
boolean caseSensitive)
Instantiates a DefaultColumnConditionModel.
|
Modifier and Type | Method and Description |
---|---|
void |
addClearedListener(EventListener listener) |
void |
addConditionStateListener(EventListener listener) |
void |
addConditionTypeListener(EventDataListener<ConditionType> listener) |
void |
addEnabledListener(EventListener listener) |
void |
addLowerBoundListener(EventListener listener) |
void |
addLowerBoundRequiredListener(EventListener listener) |
void |
addUpperBoundListener(EventListener listener) |
void |
clearCondition()
Disables and clears this condition model, that is, sets the upper and lower bounds to null
and the condition type to the default value
ConditionType.LIKE |
ColumnConditionModel.AutomaticWildcard |
getAutomaticWildcard() |
K |
getColumnIdentifier() |
protected java.lang.Comparable |
getComparable(java.lang.Object object) |
ConditionType |
getConditionType() |
EventObserver<ConditionType> |
getConditionTypeObserver() |
java.lang.String |
getDateTimeFormatPattern() |
EventObserver<java.lang.Boolean> |
getEnabledObserver() |
java.text.Format |
getFormat() |
StateObserver |
getLockedObserver() |
java.lang.Object |
getLowerBound() |
Value |
getLowerBoundValue() |
java.lang.Class |
getTypeClass() |
java.lang.Object |
getUpperBound() |
Value |
getUpperBoundValue() |
java.lang.String |
getWildcard() |
boolean |
include(java.lang.Comparable comparable) |
boolean |
include(java.lang.Object object) |
boolean |
isAutoEnable() |
boolean |
isCaseSensitive() |
boolean |
isEnabled() |
boolean |
isLocked() |
boolean |
isLowerBoundRequired() |
void |
removeClearedListener(EventListener listener) |
void |
removeConditionStateListener(EventListener listener) |
void |
removeConditionTypeListener(EventDataListener listener) |
void |
removeEnabledListener(EventListener listener) |
void |
removeLowerBoundListener(EventListener listener) |
void |
removeLowerBoundRequiredListener(EventListener listener) |
void |
removeUpperBoundListener(EventListener listener) |
void |
setAutoEnable(boolean autoEnable)
If set, this model automatically enables itself when a condition is specified
|
void |
setAutomaticWildcard(ColumnConditionModel.AutomaticWildcard automaticWildcard)
Sets the automatic wildcard type.
|
void |
setCaseSensitive(boolean caseSensitive) |
void |
setConditionType(ConditionType conditionType) |
void |
setEnabled(boolean enabled) |
void |
setLikeValue(java.lang.Object value)
A shortcut method for setting the upper bound value, conditionType to LIKE
and enabling this model in case of a non-null value.
|
void |
setLocked(boolean value) |
void |
setLowerBound(java.lang.Object value) |
void |
setUpperBound(java.lang.Object value) |
void |
setWildcard(java.lang.String wildcard) |
public DefaultColumnConditionModel(K columnIdentifier, java.lang.Class typeClass, java.lang.String wildcard)
columnIdentifier
- the column identifiertypeClass
- the data typewildcard
- the string to use as wildcardpublic DefaultColumnConditionModel(K columnIdentifier, java.lang.Class typeClass, java.lang.String wildcard, java.text.Format format, java.lang.String dateTimeFormatPattern)
columnIdentifier
- the column identifiertypeClass
- the data typewildcard
- the string to use as wildcardformat
- the format to use when presenting the values, numbers for exampledateTimeFormatPattern
- the date/time format pattern to use in case of a date/time columnpublic DefaultColumnConditionModel(K columnIdentifier, java.lang.Class typeClass, java.lang.String wildcard, java.text.Format format, java.lang.String dateTimeFormatPattern, ColumnConditionModel.AutomaticWildcard automaticWildcard)
columnIdentifier
- the column identifiertypeClass
- the data typewildcard
- the string to use as wildcardformat
- the format to use when presenting the values, numbers for exampledateTimeFormatPattern
- the date/time format pattern to use in case of a date/time columnautomaticWildcard
- the automatic wildcard type to usepublic DefaultColumnConditionModel(K columnIdentifier, java.lang.Class typeClass, java.lang.String wildcard, java.text.Format format, java.lang.String dateTimeFormatPattern, ColumnConditionModel.AutomaticWildcard automaticWildcard, boolean caseSensitive)
columnIdentifier
- the column identifiertypeClass
- the data typewildcard
- the string to use as wildcardformat
- the format to use when presenting the values, numbers for exampledateTimeFormatPattern
- the date/time format pattern to use in case of a date/time columnautomaticWildcard
- the automatic wildcard type to usecaseSensitive
- true if string based conditions should be case sensitivepublic final K getColumnIdentifier()
getColumnIdentifier
in interface ColumnConditionModel<K>
public final boolean isCaseSensitive()
isCaseSensitive
in interface ColumnConditionModel<K>
public final void setCaseSensitive(boolean caseSensitive)
setCaseSensitive
in interface ColumnConditionModel<K>
caseSensitive
- true if this condition model should be case sensitive when working with stringspublic final java.text.Format getFormat()
getFormat
in interface ColumnConditionModel<K>
public java.lang.String getDateTimeFormatPattern()
getDateTimeFormatPattern
in interface ColumnConditionModel<K>
public final void setLocked(boolean value)
setLocked
in interface ColumnConditionModel<K>
value
- true to lock this model, false to unlockpublic final boolean isLocked()
isLocked
in interface ColumnConditionModel<K>
public final java.lang.Class getTypeClass()
getTypeClass
in interface ColumnConditionModel<K>
public final void setLikeValue(java.lang.Object value)
setLikeValue
in interface ColumnConditionModel<K>
value
- the value to use as conditionpublic final void setUpperBound(java.lang.Object value)
setUpperBound
in interface ColumnConditionModel<K>
value
- the new upper boundpublic final java.lang.Object getUpperBound()
getUpperBound
in interface ColumnConditionModel<K>
public final void setLowerBound(java.lang.Object value)
setLowerBound
in interface ColumnConditionModel<K>
value
- the lower boundpublic final java.lang.Object getLowerBound()
getLowerBound
in interface ColumnConditionModel<K>
public final ConditionType getConditionType()
getConditionType
in interface ColumnConditionModel<K>
public final void setConditionType(ConditionType conditionType)
setConditionType
in interface ColumnConditionModel<K>
conditionType
- the search typepublic final boolean isLowerBoundRequired()
isLowerBoundRequired
in interface ColumnConditionModel<K>
public final java.lang.String getWildcard()
public final void setWildcard(java.lang.String wildcard)
wildcard
- the search wildcardpublic final boolean isAutoEnable()
isAutoEnable
in interface ColumnConditionModel<K>
public final void setAutoEnable(boolean autoEnable)
setAutoEnable
in interface ColumnConditionModel<K>
autoEnable
- true to enable, false to disablepublic final boolean isEnabled()
isEnabled
in interface ColumnConditionModel<K>
public final void setEnabled(boolean enabled)
setEnabled
in interface ColumnConditionModel<K>
enabled
- true to enable, false to disablepublic final void setAutomaticWildcard(ColumnConditionModel.AutomaticWildcard automaticWildcard)
ConditionType.LIKE
and ConditionType.NOT_LIKE
setAutomaticWildcard
in interface ColumnConditionModel<K>
automaticWildcard
- the automatic wildcard type to usepublic final ColumnConditionModel.AutomaticWildcard getAutomaticWildcard()
getAutomaticWildcard
in interface ColumnConditionModel<K>
public final void clearCondition()
ConditionType.LIKE
clearCondition
in interface ColumnConditionModel<K>
public final StateObserver getLockedObserver()
getLockedObserver
in interface ColumnConditionModel<K>
public Value getLowerBoundValue()
getLowerBoundValue
in interface ColumnConditionModel<K>
public Value getUpperBoundValue()
getUpperBoundValue
in interface ColumnConditionModel<K>
public final EventObserver<java.lang.Boolean> getEnabledObserver()
getEnabledObserver
in interface ColumnConditionModel<K>
public final void addEnabledListener(EventListener listener)
addEnabledListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the enabled state changespublic final void removeEnabledListener(EventListener listener)
removeEnabledListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addUpperBoundListener(EventListener listener)
addUpperBoundListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the upper bound changespublic final void removeUpperBoundListener(EventListener listener)
removeUpperBoundListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addLowerBoundListener(EventListener listener)
addLowerBoundListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the lower bound changespublic final void removeLowerBoundListener(EventListener listener)
removeLowerBoundListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addLowerBoundRequiredListener(EventListener listener)
addLowerBoundRequiredListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the lower bound required attribute changespublic final void removeLowerBoundRequiredListener(EventListener listener)
removeLowerBoundRequiredListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addClearedListener(EventListener listener)
addClearedListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the model is clearedpublic final void removeClearedListener(EventListener listener)
removeClearedListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addConditionStateListener(EventListener listener)
addConditionStateListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the condition state changespublic final void removeConditionStateListener(EventListener listener)
removeConditionStateListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final void addConditionTypeListener(EventDataListener<ConditionType> listener)
addConditionTypeListener
in interface ColumnConditionModel<K>
listener
- a listener to be notified each time the condition type changespublic final void removeConditionTypeListener(EventDataListener listener)
removeConditionTypeListener
in interface ColumnConditionModel<K>
listener
- the listener to removepublic final EventObserver<ConditionType> getConditionTypeObserver()
getConditionTypeObserver
in interface ColumnConditionModel<K>
public final boolean include(java.lang.Object object)
include
in interface ColumnConditionModel<K>
object
- the objectpublic final boolean include(java.lang.Comparable comparable)
include
in interface ColumnConditionModel<K>
comparable
- the value to checkprotected java.lang.Comparable getComparable(java.lang.Object object)
object
- the object