Interface EntityComboBoxModel.ForeignKeyFilter
- Enclosing interface:
EntityComboBoxModel
public static interface EntityComboBoxModel.ForeignKeyFilter
Controls a foreign key filter for a
EntityComboBoxModel-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears and disables this foreign key filterget()voidlink(EntityComboBoxModel filterModel) Links the given combo box model representing foreign key entities to this combo box model so that selection in the foreign key model filters this model.voidset(Entity.Key key) Filters the combo box model so that only items referencing the given key are included.voidset(Collection<Entity.Key> keys) Filters the combo box model so that only items referencing the given keys are included.strict()Controls whether foreign key filtering should be strict or not.
-
Method Details
-
set
Filters the combo box model so that only items referencing the given key are included.- Parameters:
key- the key to filter by
-
set
Filters the combo box model so that only items referencing the given keys are included. Ifkeysis empty andstrict()filtering is enabled, all entities are filtered.- Parameters:
keys- the keys to filter by
-
get
Collection<Entity.Key> get()- Returns:
- the current filter keys
-
clear
void clear()Clears and disables this foreign key filter -
strict
State strict()Controls whether foreign key filtering should be strict or not. A strict foreign key filter filters all entities if no filter keys are specified and filters individual entities if the reference key is null.- Returns:
- the
Statecontrolling whether foreign key filtering should be strict - See Also:
-
link
Links the given combo box model representing foreign key entities to this combo box model so that selection in the foreign key model filters this model. Note thatfilterModelis automatically refreshed each time this combo box model is refreshed.- Parameters:
filterModel- the combo box model filtering this model
-