|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.AbstractDataBean
dsto.dfc.databeans.DataBean
dsto.dfc.databeans.views.AbstractPropertyFilterSet
public abstract class AbstractPropertyFilterSet
Base class for automatically-generated sets of IFilter's for filtering against values of a IDataObject property. Typically, for each distinct value of the property, a filter will appear in this set that selects that value, but this may be customised by subclasses. This can be useful as the underlying model for filtering views.
PropertyFilterSet
,
MultiValuePropertyFilterSet
Field Summary | |
---|---|
protected Map<Object,Integer> |
counts
|
protected String |
property
|
protected IDataObject |
source
|
Fields inherited from class dsto.dfc.databeans.DataBean |
---|
alwaysTransient, transientProperties, typeInfo, values |
Fields inherited from class dsto.dfc.databeans.AbstractDataObject |
---|
listeners |
Fields inherited from interface dsto.dfc.databeans.IDataObject |
---|
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE |
Constructor Summary | |
---|---|
AbstractPropertyFilterSet(IDataObject source,
String property)
|
Method Summary | |
---|---|
protected void |
addFilter(Object value,
IFilter<IDataObject> filter)
Add a filter for a value. |
protected abstract void |
addFiltersFor(Object value)
Add filters for a given property value. |
protected void |
addItem(IDataObject item)
Add the filters for a given item in the source set. |
void |
dispose()
Dispose of the object (unregister listeners, close open resources etc). |
IFilter<IDataObject> |
filterFor(Object value)
Get the filter for a given value. |
boolean |
hasFilterFor(Object value)
True if a filter exists for a given value. |
void |
propertyValueChanged(PropertyEvent e)
|
protected void |
removeFilter(Object value)
Remove a filter for a value. |
protected abstract void |
removeFiltersFor(Object value)
Remove filters for a given property value. |
protected void |
removeItem(IDataObject item)
Remove the filters for a given item in the source set. |
protected abstract void |
updateFilters(PropertyPath path,
Object oldValue,
Object newValue)
Update filters for a given property value when the value itself has changed (i.e. |
Methods inherited from class dsto.dfc.databeans.DataBean |
---|
childPropertyChanged, getPropertyNames, getTypeInfo, getValue, isTransient, propertyIterator, setAlwaysTransient, setTypeInfo, setValue, shallowClone |
Methods inherited from class dsto.dfc.databeans.AbstractDataBean |
---|
setValue, setValue, setValue, setValue, setValue, setValue, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface dsto.dfc.databeans.IDataBean |
---|
getBeanValue, getBooleanValue, getCharValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getObjectValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue |
Methods inherited from interface dsto.dfc.databeans.IDataObject |
---|
addPropertyListener, getPropertyListeners, removePropertyListener, setValue |
Field Detail |
---|
protected String property
protected IDataObject source
protected Map<Object,Integer> counts
Constructor Detail |
---|
public AbstractPropertyFilterSet(IDataObject source, String property)
Method Detail |
---|
public boolean hasFilterFor(Object value)
filterFor(Object)
public IFilter<IDataObject> filterFor(Object value) throws IllegalArgumentException
value
- The value.
IllegalArgumentException
- if no filter exists for the value.protected void addItem(IDataObject item)
protected void removeItem(IDataObject item)
protected abstract void addFiltersFor(Object value)
protected abstract void removeFiltersFor(Object value)
protected abstract void updateFilters(PropertyPath path, Object oldValue, Object newValue)
path
- The propery path that changed.oldValue
- The old value at path.newValue
- The new value at path.protected void addFilter(Object value, IFilter<IDataObject> filter)
protected void removeFilter(Object value)
public void dispose()
Disposable
dispose
in interface Disposable
public void propertyValueChanged(PropertyEvent e)
propertyValueChanged
in interface PropertyListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |