|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jminor.framework.client.model.DefaultEntityTableSearchModel
public class DefaultEntityTableSearchModel
A default EntityTableSearchModel implementation
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jminor.common.model.FilterCriteria |
---|
FilterCriteria.AcceptAllCriteria<T>, FilterCriteria.RejectAllCriteria<T> |
Constructor Summary | |
---|---|
DefaultEntityTableSearchModel(String entityID,
EntityConnectionProvider connectionProvider,
boolean simpleSearch)
Instantiates a new DefaultEntityTableSearchModel |
|
DefaultEntityTableSearchModel(String entityID,
EntityConnectionProvider connectionProvider,
boolean simpleSearch,
PropertyFilterModelProvider filterModelProvider,
PropertySearchModelProvider searchModelProvider)
Instantiates a new DefaultEntityTableSearchModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEntityTableSearchModel(String entityID, EntityConnectionProvider connectionProvider, boolean simpleSearch)
entityID
- the ID of the underlying entityconnectionProvider
- a EntityConnectionProvider instance, required if searchableProperties
include
foreign key properties
assumed to belong to the entity identified by entityID
simpleSearch
- if true then search panels based on this search model should implement a simplified searchpublic DefaultEntityTableSearchModel(String entityID, EntityConnectionProvider connectionProvider, boolean simpleSearch, PropertyFilterModelProvider filterModelProvider, PropertySearchModelProvider searchModelProvider)
entityID
- the ID of the underlying entityconnectionProvider
- a EntityConnectionProvider instance, required if searchableProperties
include
foreign key properties
assumed to belong to the entity identified by entityID
simpleSearch
- if true then search panels based on this search model should implement a simplified searchfilterModelProvider
- provides the column filter models for this table search modelsearchModelProvider
- provides the column search models for this table search modelMethod Detail |
---|
public final String getEntityID()
getEntityID
in interface EntityDataProvider
getEntityID
in interface EntityTableSearchModel
public final EntityConnectionProvider getConnectionProvider()
getConnectionProvider
in interface EntityDataProvider
public final boolean isSimpleSearch()
isSimpleSearch
in interface EntityTableSearchModel
public final List<Property.SearchableProperty> getSearchableProperties()
getSearchableProperties
in interface EntityTableSearchModel
public final void setSearchModelState()
setSearchModelState
in interface EntityTableSearchModel
EntityTableSearchModel.getSearchStateChangedState()
public final ColumnSearchModel<Property> getPropertyFilterModel(String propertyID)
propertyID
getPropertyFilterModel
in interface EntityTableSearchModel
propertyID
- the id of the property for which to retrieve the PropertyFilterModel
propertyID
public final Collection<ColumnSearchModel<Property>> getPropertyFilterModels()
getPropertyFilterModels
in interface EntityTableSearchModel
public final List<ColumnSearchModel<Property>> getPropertyFilterModelsOrdered()
getPropertyFilterModelsOrdered
in interface EntityTableSearchModel
public final boolean include(Entity item)
include
in interface FilterCriteria<Entity>
item
- the item
item
should be included, false if it should be filteredpublic final void refresh()
refresh
in interface Refreshable
public final void clear()
clear
in interface Refreshable
public final void clearPropertySearchModels()
clearPropertySearchModels
in interface EntityTableSearchModel
public final Collection<PropertySearchModel<? extends Property.SearchableProperty>> getPropertySearchModels()
getPropertySearchModels
in interface EntityTableSearchModel
public final boolean containsPropertySearchModel(String propertyID)
containsPropertySearchModel
in interface EntityTableSearchModel
propertyID
- the id of the property for which to check for the PropertySearchModel
propertyID
public final PropertySearchModel<? extends Property.SearchableProperty> getPropertySearchModel(String propertyID)
getPropertySearchModel
in interface EntityTableSearchModel
propertyID
- the id of the property for which to retrieve the PropertySearchModel
propertyID
public final boolean isSearchEnabled(String propertyID)
isSearchEnabled
in interface EntityTableSearchModel
propertyID
- the column propertyID
columnIndex
is enabledpublic final boolean isFilterEnabled(String propertyID)
isFilterEnabled
in interface EntityTableSearchModel
propertyID
- column propertyID
columnIndex
is enabledpublic final boolean setSearchValues(String propertyID, Collection<?> values)
propertyID
setSearchValues
in interface EntityTableSearchModel
propertyID
- the ID of the propertyvalues
- the search criteria values
public final void setFilterValue(String propertyID, Comparable value)
propertyID
.
setFilterValue
in interface EntityTableSearchModel
propertyID
- the id of the propertyvalue
- the criteria valuepublic final Criteria<Property.ColumnProperty> getSearchCriteria()
getSearchCriteria
in interface EntityTableSearchModel
public final Criteria<Property.ColumnProperty> getAdditionalSearchCriteria()
getAdditionalSearchCriteria
in interface EntityTableSearchModel
public final EntityTableSearchModel setAdditionalSearchCriteria(Criteria<Property.ColumnProperty> criteria)
setAdditionalSearchCriteria
in interface EntityTableSearchModel
criteria
- the criteria
public final Conjunction getSearchConjunction()
getSearchConjunction
in interface EntityTableSearchModel
Conjunction.AND
Conjunction
public final void setSearchConjunction(Conjunction conjunction)
setSearchConjunction
in interface EntityTableSearchModel
conjunction
- the conjunction to be used when more than one column search criteria is activeConjunction
public final void setSearchEnabled(String propertyID, boolean enabled)
setSearchEnabled
in interface EntityTableSearchModel
propertyID
- the ID of the property for which to enable/disable the searchenabled
- if true the search is enabled, otherwise it is disabledpublic final StateObserver getSearchStateChangedState()
getSearchStateChangedState
in interface EntityTableSearchModel
EntityTableSearchModel.setSearchModelState()
public final void addFilterStateListener(ActionListener listener)
addFilterStateListener
in interface EntityTableSearchModel
listener
- a listener notified each time the filter state changespublic final void removeFilterStateListener(ActionListener listener)
removeFilterStateListener
in interface EntityTableSearchModel
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |