public class ContainerValueSource<E extends Entity,V> extends java.lang.Object implements EntityValueSource<E,V>, BeanLocatorAware
EntityValueSource.InstanceChangeEvent<E extends Entity>
ValueSource.ValueChangeEvent<V>
DataUnit.StateChangeEvent
Modifier and Type | Field and Description |
---|---|
protected InstanceContainer<E> |
container |
protected boolean |
dataModelSecurityEnabled |
protected com.haulmont.bali.events.EventHub |
events |
protected com.haulmont.chile.core.model.MetaPropertyPath |
metaPropertyPath |
protected java.lang.String |
property |
protected BindingState |
state |
Constructor and Description |
---|
ContainerValueSource(InstanceContainer<E> container,
java.lang.String property) |
Modifier and Type | Method and Description |
---|---|
com.haulmont.bali.events.Subscription |
addInstanceChangeListener(java.util.function.Consumer<EntityValueSource.InstanceChangeEvent<E>> listener) |
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<V>> listener)
Registers a new value change listener.
|
protected boolean |
canUpdateMasterRefs() |
protected void |
containerItemChanged(InstanceContainer.ItemChangeEvent e) |
protected void |
containerItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent e) |
protected java.util.Collection<? extends V> |
copyPropertyCollection(java.util.Collection<? extends V> propertyValue) |
InstanceContainer<E> |
getContainer() |
protected DataContext |
getDataContext() |
com.haulmont.chile.core.model.MetaClass |
getEntityMetaClass() |
protected com.haulmont.chile.core.model.MetaProperty |
getInverseProperty() |
E |
getItem() |
com.haulmont.chile.core.model.MetaPropertyPath |
getMetaPropertyPath() |
BindingState |
getState() |
java.lang.Class<V> |
getType() |
V |
getValue() |
boolean |
isDataModelSecurityEnabled() |
boolean |
isReadOnly() |
void |
setBeanLocator(BeanLocator beanLocator) |
void |
setDataModelSecurityEnabled(boolean enabled)
Sets data model security enabled for data binding.
|
protected void |
setState(BindingState state) |
void |
setValue(V value) |
protected void |
updateMasterRefs(V value) |
protected final InstanceContainer<E extends Entity> container
protected com.haulmont.chile.core.model.MetaPropertyPath metaPropertyPath
protected java.lang.String property
protected BindingState state
protected com.haulmont.bali.events.EventHub events
protected boolean dataModelSecurityEnabled
public ContainerValueSource(InstanceContainer<E> container, java.lang.String property)
public void setDataModelSecurityEnabled(boolean enabled)
enabled
- enabled flagpublic void setBeanLocator(BeanLocator beanLocator)
setBeanLocator
in interface BeanLocatorAware
public com.haulmont.chile.core.model.MetaClass getEntityMetaClass()
getEntityMetaClass
in interface EntityDataUnit
MetaClass
of an entity contained in the sourcepublic com.haulmont.chile.core.model.MetaPropertyPath getMetaPropertyPath()
getMetaPropertyPath
in interface EntityValueSource<E extends Entity,V>
public E getItem()
getItem
in interface EntityValueSource<E extends Entity,V>
public boolean isDataModelSecurityEnabled()
isDataModelSecurityEnabled
in interface EntityValueSource<E extends Entity,V>
public V getValue()
getValue
in interface ValueSource<V>
public void setValue(V value)
setValue
in interface ValueSource<V>
public boolean isReadOnly()
isReadOnly
in interface ValueSource<V>
public java.lang.Class<V> getType()
getType
in interface ValueSource<V>
public BindingState getState()
public com.haulmont.bali.events.Subscription addInstanceChangeListener(java.util.function.Consumer<EntityValueSource.InstanceChangeEvent<E>> listener)
addInstanceChangeListener
in interface EntityValueSource<E extends Entity,V>
public com.haulmont.bali.events.Subscription addStateChangeListener(java.util.function.Consumer<DataUnit.StateChangeEvent> listener)
DataUnit
addStateChangeListener
in interface DataUnit
listener
- the listener to be addedpublic com.haulmont.bali.events.Subscription addValueChangeListener(java.util.function.Consumer<ValueSource.ValueChangeEvent<V>> listener)
ValueSource
addValueChangeListener
in interface ValueSource<V>
listener
- the listener to be addedprotected void setState(BindingState state)
protected void containerItemChanged(InstanceContainer.ItemChangeEvent e)
protected void containerItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent e)
protected boolean canUpdateMasterRefs()
protected void updateMasterRefs(V value)
protected java.util.Collection<? extends V> copyPropertyCollection(java.util.Collection<? extends V> propertyValue)
protected DataContext getDataContext()
protected com.haulmont.chile.core.model.MetaProperty getInverseProperty()
public InstanceContainer<E> getContainer()