|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.property.AbstractConfigurableEntity
Abstract base class for ConfigurableEntity implementations. This class provides the basic CE functionality, including explicit properties, but does not persist properties in any way. It also does not use Property Sets for property validation or default value retrieval, as it does not have a consistent way to access the Property Set Manager. Any classes that wish to use the ConfigurableEntity functionality in a lightweight object should extend this.
Field Summary | |
protected static java.lang.String |
CE_METHOD_CACHE
cache name for CE explicit methods |
protected java.lang.Class |
instanceClass
The actual implementation class of this entity |
protected static java.lang.String |
PREFIX_GET
prefix to find accessor methods via reflection |
protected static java.lang.String |
PREFIX_SET
prefix to find mutator methods via reflection |
protected EntityPropertyCache |
propertyCache
internal store of properties |
protected static com.bea.p13n.i18n.PropertyExceptionTextFormatter |
textFormatter
Exception class |
Constructor Summary | |
AbstractConfigurableEntity()
|
Method Summary | |
static PropertyMapKey |
createMapKey(java.lang.String propertySet,
java.lang.String propertyName)
Helper function that will allocate a PropertyMapKey from a property set name and property name. |
java.lang.Object |
getCachedProperty(java.lang.String propertySet,
java.lang.String propertyName)
Retrieve the value associated with the key from the object cache |
protected java.lang.Object |
getExplicitProperty(java.lang.String propertyName)
Find and invoke the explicit accessor method for the given property in the implementation class of the entity. |
protected java.lang.reflect.Method |
getExplicitSetter(java.lang.String propertyName,
java.lang.Object value)
Search for a setter method for the given property name and value object. |
protected java.lang.Object |
getImplicitProperty(java.lang.String propertySet,
java.lang.String propertyName)
Look for a value for the given property in the standard database tables. |
java.lang.String |
getJndiName()
Retrieve the jndi name for an entity. |
java.lang.String |
getPkString()
Retrieve the pk string for an entity. |
java.lang.Object |
getProperty(java.lang.String propertySet,
java.lang.String propertyName)
Retrieve the value that was persisted for this entity for the given property, within the given property set. |
java.lang.String |
getPropertyAsString(java.lang.String propertySet,
java.lang.String propertyName)
Convenience method to return a property as a String. |
EntityPropertyCache |
getPropertyCache()
Allocate the property map and load it using the EntityPropertyManager. |
java.lang.Object |
getPropertyNoDefault(java.lang.String propertySet,
java.lang.String propertyName)
Retrieve the value associated with the named key in the specified property set, but does not return a default value from the property's PropertyDefinition if a value was not persisted for this entity. |
long |
getUniqueId()
Retrieve the unique identifier generated for this ConfigurableEntity. |
protected boolean |
hasExplicitGetter(java.lang.String propertyName)
Determine if an explicit getter method exists for the given property in the implementation class of the entity. |
protected boolean |
hasExplicitSetter(java.lang.String propertyName,
java.lang.Object value)
Determine if an explicit setter method exists for the given property in the implementation class of the entity. |
protected void |
removeExplicitProperty(java.lang.String propertyName,
java.lang.Object prototypeValue)
|
java.lang.Object |
removeProperty(java.lang.String propertySet,
java.lang.String propertyName)
Remove the property associated with the named key in the specified property set. |
protected void |
setExplicitProperty(java.lang.String propertyName,
java.lang.Object value)
Set a property on the entity using the explicit set |
void |
setProperty(java.lang.String propertySet,
java.lang.String propertyName,
java.lang.Object value)
Associate the specified value with the named key in the specified property set. |
protected java.lang.String |
upcaseFirst(java.lang.String s)
Make the first letter of the string upper cased. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final java.lang.String PREFIX_SET
protected static final java.lang.String PREFIX_GET
protected java.lang.Class instanceClass
protected transient EntityPropertyCache propertyCache
protected static final com.bea.p13n.i18n.PropertyExceptionTextFormatter textFormatter
protected static final java.lang.String CE_METHOD_CACHE
Constructor Detail |
public AbstractConfigurableEntity()
Method Detail |
public java.lang.Object getProperty(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- The name of the property set to look inpropertyName
- The name of the property to retrieve.public java.lang.String getPropertyAsString(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- The name of the property set to look inpropertyName
- The name of the property to retrieve.public java.lang.Object getPropertyNoDefault(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- The name of the property setpropertyName
- The name of the property to retrieve.public void setProperty(java.lang.String propertySet, java.lang.String propertyName, java.lang.Object value) throws PropertyValidationException, java.rmi.RemoteException
propertySet
- The name of the property set.propertyName
- The name of the property to assignvalue
- The value to associate with the property namepublic java.lang.Object removeProperty(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
NOTE: if an explicit setter method is found for this property, this method will set the value to null.
propertySet
- The name of the property set.propertyName
- The name of the property to remove.public long getUniqueId() throws java.rmi.RemoteException
public java.lang.String getPkString() throws java.rmi.RemoteException
public java.lang.String getJndiName() throws java.rmi.RemoteException
protected java.lang.Object getImplicitProperty(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- the property set to look inpropertyName
- the name of the propertypublic java.lang.Object getCachedProperty(java.lang.String propertySet, java.lang.String propertyName) throws java.rmi.RemoteException
propertySet
- The property set to look inpropertyName
- The name of the propertyprotected boolean hasExplicitGetter(java.lang.String propertyName)
propertyName
- the name of the property to look forprotected java.lang.Object getExplicitProperty(java.lang.String propertyName)
propertyName
- the name of the property to look forprotected java.lang.reflect.Method getExplicitSetter(java.lang.String propertyName, java.lang.Object value)
protected boolean hasExplicitSetter(java.lang.String propertyName, java.lang.Object value)
propertyName
- the name of the property to look forvalue
- a value that represents the property type to look forprotected void setExplicitProperty(java.lang.String propertyName, java.lang.Object value)
propertyName
- the name of the property to setvalue
- the value to pass to the mutator methodprotected void removeExplicitProperty(java.lang.String propertyName, java.lang.Object prototypeValue)
public EntityPropertyCache getPropertyCache() throws java.rmi.RemoteException
public static PropertyMapKey createMapKey(java.lang.String propertySet, java.lang.String propertyName)
propertySet
- the property set name to usepropertyName
- the property name to useprotected final java.lang.String upcaseFirst(java.lang.String s)
s
- the string to process
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |