public class KeyValueEntity extends AbstractInstance implements Entity<java.lang.Object>, CubaEnhancingDisabled
KeyValueEntity company = new KeyValueEntity();
company.setValue("email", "info@globex.com");
company.setValue("name", "Globex Corporation");
KeyValueEntity person = new KeyValueEntity();
person.setValue("email", "homer.simpson@mail.com");
person.setValue("firstName", "Homer");
person.setValue("lastName", "Simpson");
Instance.PropertyChangeEvent, Instance.PropertyChangeListener| Constructor and Description |
|---|
KeyValueEntity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Object |
getId() |
java.lang.String |
getIdName() |
MetaClass |
getMetaClass() |
<T> T |
getValue(java.lang.String name)
Get an attribute value.
|
int |
hashCode() |
void |
setId(java.lang.Object id) |
void |
setIdName(java.lang.String idName)
Sets the name of a property that represents this entity id.
|
void |
setMetaClass(MetaClass metaClass)
Sets a meta-class for this entity instance.
|
void |
setValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals)
Set value to property in instance
For internal use only.
|
java.lang.String |
toString() |
addListener, addPropertyChangeListener, getInstanceName, getValueEx, removeAllListeners, removeListener, removePropertyChangeListener, setValue, setValueExaddListener, addPropertyChangeListener, getInstanceName, getValueEx, removeAllListeners, removeListener, removePropertyChangeListener, setValue, setValueExpublic MetaClass getMetaClass()
getMetaClass in interface Instancepublic void setMetaClass(MetaClass metaClass)
public java.lang.String getIdName()
setIdName(String)public void setIdName(java.lang.String idName)
public <T> T getValue(java.lang.String name)
InstancegetValue in interface InstancegetValue in class AbstractInstancename - attribute name according to JavaBeans notationpublic void setValue(java.lang.String name,
java.lang.Object value,
boolean checkEquals)
AbstractInstanceAbstractInstance.setValue(String, Object)setValue in class AbstractInstancename - property namevalue - valuecheckEquals - check equals for previous and new value.
If flag is true and objects equals, then setter will not be invokedpublic void setId(java.lang.Object id)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object