public class NamedPropertyClass
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.locks.Lock |
lock
Lock to protect the property map
|
protected java.lang.String |
name |
Constructor and Description |
---|
NamedPropertyClass() |
NamedPropertyClass(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanProperty(java.lang.String key)
if null, returns false
|
java.lang.Integer |
getIntProperty(java.lang.String key) |
long |
getLongProperty(java.lang.String key) |
java.lang.String |
getName()
Returns the name of this entity.
|
java.io.Serializable |
getProperty(java.lang.String key)
Returns the property named by key.
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropertyMap()
For java beans xml serialization, not for general consumption.
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropertyMapRef() |
java.lang.String |
getStringProperty(java.lang.String key) |
void |
lock() |
java.lang.Integer |
modifyIntProperty(java.lang.String key,
int delta)
Helper method for entity properties.
|
java.io.Serializable |
removeProperty(java.lang.String key)
Remove the named property.
|
void |
setName(java.lang.String name)
Sets the name for this entity.
|
java.io.Serializable |
setProperty(java.lang.String key,
java.io.Serializable value)
Sets a property (name/value pair) to this entity.
|
void |
setPropertyMap(java.util.Map<java.lang.String,java.io.Serializable> propMap)
For java beans xml serialization, not for general consumption.
|
protected void |
setupTransient() |
void |
unlock() |
protected transient java.util.concurrent.locks.Lock lock
protected java.lang.String name
public NamedPropertyClass()
public NamedPropertyClass(java.lang.String name)
protected void setupTransient()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- name for this entity.public java.io.Serializable setProperty(java.lang.String key, java.io.Serializable value)
If you have an accessor method to a property like getDisplayContext() and setDisplayContext() make sure to set it up as transient with the Introspector's BeanInfo object. See AOObject static initialization block for an example.
public java.io.Serializable getProperty(java.lang.String key)
key
- serializable key object.java.lang.InterruptedException
setProperty(String, Serializable)
public java.io.Serializable removeProperty(java.lang.String key)
key
- serializable key object.public java.lang.String getStringProperty(java.lang.String key)
public boolean getBooleanProperty(java.lang.String key)
java.lang.InterruptedException
public java.lang.Integer getIntProperty(java.lang.String key)
public long getLongProperty(java.lang.String key)
public java.lang.Integer modifyIntProperty(java.lang.String key, int delta)
key
- key for propertydelta
- amount changed, can be negative.public java.util.Map<java.lang.String,java.io.Serializable> getPropertyMap()
public void setPropertyMap(java.util.Map<java.lang.String,java.io.Serializable> propMap)
public java.util.Map<java.lang.String,java.io.Serializable> getPropertyMapRef()
public void lock()
public void unlock()