public abstract class AbstractInstance extends java.lang.Object implements Instance
Instance.BeanPropertyPath, Instance.PropertyChangeEvent, Instance.PropertyChangeListener| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<java.lang.ref.WeakReference<Instance.PropertyChangeListener>> |
__propertyChangeListeners |
protected static int |
PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY |
| Constructor and Description |
|---|
AbstractInstance() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(Instance.PropertyChangeListener listener)
Add listener to track attributes changes.
|
java.lang.String |
getInstanceName()
Deprecated.
|
protected MethodsCache |
getMethodsCache() |
protected RelatedPropertiesCache |
getRelatedPropertiesCache() |
protected java.util.Collection<java.lang.String> |
getRelatedReadOnlyProperties(java.lang.String propertyName) |
<T> T |
getValue(java.lang.String name)
Get an attribute value.
|
<T> T |
getValueEx(Instance.BeanPropertyPath propertyPath)
Get an attribute value.
|
<T> T |
getValueEx(java.lang.String name)
Get an attribute value.
|
protected void |
propertyChanged(java.lang.String s,
java.lang.Object prev,
java.lang.Object curr) |
void |
removeAllListeners()
Remove all
Instance.PropertyChangeListeners. |
void |
removePropertyChangeListener(Instance.PropertyChangeListener listener)
Remove listener.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Set an attribute value.
|
void |
setValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals)
Set value to property in instance
For internal use only.
|
void |
setValueEx(Instance.BeanPropertyPath propertyPath,
java.lang.Object value)
Set an attribute value.
|
void |
setValueEx(java.lang.String name,
java.lang.Object value)
Set an attribute value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetaClassprotected static final int PROPERTY_CHANGE_LISTENERS_INITIAL_CAPACITY
protected transient java.util.Collection<java.lang.ref.WeakReference<Instance.PropertyChangeListener>> __propertyChangeListeners
protected void propertyChanged(java.lang.String s,
java.lang.Object prev,
java.lang.Object curr)
@Deprecated public java.lang.String getInstanceName()
MetadataTools.getInstanceName(com.haulmont.chile.core.model.Instance) instead.getInstanceName in interface InstanceNamePattern
or toString().public void addPropertyChangeListener(Instance.PropertyChangeListener listener)
InstanceaddPropertyChangeListener in interface Instancelistener - listenerpublic void removePropertyChangeListener(Instance.PropertyChangeListener listener)
InstanceremovePropertyChangeListener in interface Instancelistener - listener to removepublic void removeAllListeners()
InstanceInstance.PropertyChangeListeners.removeAllListeners in interface Instancepublic <T> T getValue(java.lang.String name)
Instanceprotected MethodsCache getMethodsCache()
protected java.util.Collection<java.lang.String> getRelatedReadOnlyProperties(java.lang.String propertyName)
protected RelatedPropertiesCache getRelatedPropertiesCache()
public void setValue(java.lang.String name,
@Nullable
java.lang.Object value)
InstanceInstance.PropertyChangeListeners only if the attribute
was actually changed.public void setValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals)
setValue(String, Object)name - property namevalue - valuecheckEquals - check equals for previous and new value.
If flag is true and objects equals, then setter will not be invokedpublic <T> T getValueEx(java.lang.String name)
Instancecar.driver.name.getValueEx in interface Instancename - path to an attributeInstance, this method
stops here and returns this value.@Nullable public <T> T getValueEx(Instance.BeanPropertyPath propertyPath)
Instancecar.driver.name.getValueEx in interface InstancepropertyPath - path to an attributeInstance, this method
stops here and returns this value.public void setValueEx(java.lang.String name,
java.lang.Object value)
Instancecar.driver.name.
car.driver attribute, and if it is not
null and is an Instance, sets value of name attribute in it.
Instance.PropertyChangeListeners only if the attribute
was actually changed.setValueEx in interface Instancename - path to an attributevalue - attribute valuepublic void setValueEx(Instance.BeanPropertyPath propertyPath, java.lang.Object value)
Instancecar.driver.name.
car.driver attribute, and if it is not
null and is an Instance, sets value of name attribute in it.
Instance.PropertyChangeListeners only if the attribute
was actually changed.setValueEx in interface InstancepropertyPath - path to an attributevalue - attribute value