Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityTableModel.ColumnPreferences.ConditionPreferences
- Enclosing interface:
- EntityTableModel.ColumnPreferences
public static interface EntityTableModel.ColumnPreferences.ConditionPreferences
Represents preferences for a
ColumnConditionModel
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
apply
(EntityTableModel<?> tableModel, List<Attribute<?>> columnAttributes, String preferencesString) Applies the given condition preferences to the given table modelAttribute<?>
boolean
boolean
conditionPreferences
(Attribute<?> attribute, boolean autoEnable, boolean caseSensitive, ColumnConditionModel.AutomaticWildcard automaticWildcard) Creates a newEntityTableModel.ColumnPreferences.ConditionPreferences
instance.fromString
(Collection<Attribute<?>> attributes, String preferencesString) org.json.JSONObject
static String
toString
(Map<Attribute<?>, EntityTableModel.ColumnPreferences.ConditionPreferences> conditionPreferences)
-
Field Details
-
CONDITIONS_KEY
The key identifying condition preferences- See Also:
-
AUTO_ENABLE_KEY
The key for the 'autoEnable' property- See Also:
-
CASE_SENSITIVE_KEY
The key for the 'caseSensitive' property- See Also:
-
AUTOMATIC_WILDCARD_KEY
The key for the 'automaticWildcard' property- See Also:
-
-
Method Details
-
attribute
Attribute<?> attribute()- Returns:
- the attribute
-
autoEnable
boolean autoEnable()- Returns:
- true if this condition auto enables
-
caseSensitive
boolean caseSensitive()- Returns:
- true if this condition is case sensitive
-
automaticWildcard
ColumnConditionModel.AutomaticWildcard automaticWildcard()- Returns:
- the
ColumnConditionModel.AutomaticWildcard
configuration for this condition model
-
toJSONObject
org.json.JSONObject toJSONObject()- Returns:
- a JSONObject representation of this condition preferences instance
-
conditionPreferences
static EntityTableModel.ColumnPreferences.ConditionPreferences conditionPreferences(Attribute<?> attribute, boolean autoEnable, boolean caseSensitive, ColumnConditionModel.AutomaticWildcard automaticWildcard) Creates a newEntityTableModel.ColumnPreferences.ConditionPreferences
instance.- Parameters:
attribute
- the attributeautoEnable
- true if auto enable is enabledcaseSensitive
- true if case sensitiveautomaticWildcard
- the automatic wildcard state- Returns:
- a new
EntityTableModel.ColumnPreferences.ConditionPreferences
instance.
-
toString
static String toString(Map<Attribute<?>, EntityTableModel.ColumnPreferences.ConditionPreferences> conditionPreferences) - Parameters:
conditionPreferences
- the condition preferences mapped to their respective attribute- Returns:
- a string encoding of the given preferences
-
fromString
static Map<Attribute<?>,EntityTableModel.ColumnPreferences.ConditionPreferences> fromString(Collection<Attribute<?>> attributes, String preferencesString) - Parameters:
attributes
- the attributespreferencesString
- the preferences encoded as as string- Returns:
- a map containing the
EntityTableModel.ColumnPreferences
instances parsed from the given string
-
apply
static void apply(EntityTableModel<?> tableModel, List<Attribute<?>> columnAttributes, String preferencesString) Applies the given condition preferences to the given table model- Parameters:
tableModel
- the table model to apply the preferences tocolumnAttributes
- the available column attributespreferencesString
- the condition preferences string
-