V
- value typepublic class LegacyCollectionDsValueSource<V extends Entity> extends java.lang.Object implements ValueSource<java.util.Collection<V>>, BeanLocatorAware
ValueSource.ValueChangeEvent<V>
DataUnit.StateChangeEvent
Modifier and Type | Field and Description |
---|---|
protected CollectionDatasource |
datasource |
protected com.haulmont.bali.events.EventHub |
events |
protected Metadata |
metadata |
protected com.haulmont.chile.core.model.MetaPropertyPath |
metaPropertyPath |
protected BindingState |
state |
Constructor and Description |
---|
LegacyCollectionDsValueSource(CollectionDatasource datasource) |
Modifier and Type | Method and Description |
---|---|
com.haulmont.bali.events.Subscription |
addStateChangeListener(java.util.function.Consumer<DataUnit.StateChangeEvent> listener)
Registers a new state change listener.
|
com.haulmont.bali.events.Subscription |
addValueChangeListener(java.util.function.Consumer<ValueSource.ValueChangeEvent<java.util.Collection<V>>> listener)
Registers a new value change listener.
|
protected boolean |
canUpdateMasterRefs() |
protected void |
collectionChanged(CollectionDatasource.CollectionChangeEvent e) |
protected java.util.Collection<V> |
copyPropertyCollection(java.util.Collection<V> propertyValue) |
protected boolean |
equalCollections(java.util.Collection c1,
java.util.Collection c2) |
CollectionDatasource |
getDatasource() |
protected com.haulmont.chile.core.model.MetaProperty |
getInverseProperty() |
protected Datasource |
getMaster() |
BindingState |
getState() |
java.lang.Class<java.util.Collection<V>> |
getType() |
java.util.Collection<V> |
getValue() |
boolean |
isReadOnly() |
void |
setBeanLocator(BeanLocator beanLocator) |
protected void |
setDatasourceValue(java.util.Collection<V> value) |
protected void |
setPropertyDatasourceValue(java.util.Collection<V> value) |
void |
setValue(java.util.Collection<V> value) |
protected void |
updateMasterCollection(com.haulmont.chile.core.model.MetaProperty metaProperty,
java.util.Collection<V> newCollection) |
protected CollectionDatasource datasource
protected com.haulmont.chile.core.model.MetaPropertyPath metaPropertyPath
protected com.haulmont.bali.events.EventHub events
protected BindingState state
protected Metadata metadata
public LegacyCollectionDsValueSource(CollectionDatasource datasource)
public void setBeanLocator(BeanLocator beanLocator)
setBeanLocator
in interface BeanLocatorAware
protected void collectionChanged(CollectionDatasource.CollectionChangeEvent e)
public CollectionDatasource getDatasource()
public java.util.Collection<V> getValue()
getValue
in interface ValueSource<java.util.Collection<V extends Entity>>
public void setValue(java.util.Collection<V> value)
setValue
in interface ValueSource<java.util.Collection<V extends Entity>>
protected void setDatasourceValue(java.util.Collection<V> value)
protected void setPropertyDatasourceValue(java.util.Collection<V> value)
public java.lang.Class<java.util.Collection<V>> getType()
getType
in interface ValueSource<java.util.Collection<V extends Entity>>
public boolean isReadOnly()
isReadOnly
in interface ValueSource<java.util.Collection<V extends Entity>>
public BindingState getState()
public com.haulmont.bali.events.Subscription addValueChangeListener(java.util.function.Consumer<ValueSource.ValueChangeEvent<java.util.Collection<V>>> listener)
ValueSource
addValueChangeListener
in interface ValueSource<java.util.Collection<V extends Entity>>
listener
- the listener to be addedpublic com.haulmont.bali.events.Subscription addStateChangeListener(java.util.function.Consumer<DataUnit.StateChangeEvent> listener)
DataUnit
addStateChangeListener
in interface DataUnit
listener
- the listener to be addedprotected boolean canUpdateMasterRefs()
protected java.util.Collection<V> copyPropertyCollection(java.util.Collection<V> propertyValue)
protected boolean equalCollections(java.util.Collection c1, java.util.Collection c2)
protected void updateMasterCollection(com.haulmont.chile.core.model.MetaProperty metaProperty, @Nullable java.util.Collection<V> newCollection)
protected com.haulmont.chile.core.model.MetaProperty getInverseProperty()
protected Datasource getMaster()