public class IlpBeansObject extends Object implements IlpObject, PropertyChangeListener
IlpObject interface to wrap
a bean. A bean, that is, a JavaBeans instance, is an instance of a class that
follows the JavaBeans conventions.
Instances of this class can be inserted in a data source. The
IlpDefaultDataSource even provides a method
IlpDefaultDataSource.addBean(Object, Object) that
creates an IlpBeansObject instance from a Java object.
IlpBeansClassVALUE_NOT_SET| Constructor and Description |
|---|
IlpBeansObject(Object bean,
IlpClass ilpClass,
Object identifier)
Creates an
IlpObject instance to encapsulate the given bean. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeValueListener(AttributeValueListener l)
Adds a listener to attribute value changes.
|
void |
fireEvent(AttributeValueEvent ev)
Fires the event to all listeners.
|
IlpAttributeGroup |
getAttributeGroup()
Returns the model that defines which attributes are allowed
in this instance.
|
Object |
getAttributeValue(IlpAttribute attribute)
Retrieves the value of an attribute of this object.
|
Object |
getAttributeValue(String name)
Returns the value of an attribute of this object.
|
Object |
getBean()
Returns the bean encapsulated by this instance.
|
Object |
getIdentifier()
Returns the identifier of the
IlpObject. |
IlpBeansClass |
getIlpBeansClass()
Returns the
IlpClass of this object. |
IlpClass |
getIlpClass()
Returns the
IlpClass of this object. |
boolean |
hasAttributeValue(IlpAttribute a)
Returns
true if the requested attribute exists in the bean. |
void |
initializeDefaultValues()
This method initializes the attribute values of the object with the default
attribute values, if there are any.
|
void |
propertyChange(PropertyChangeEvent evt)
Property change listener notification.
|
void |
removeAttributeValueListener(AttributeValueListener l)
Removes the given listener from the attribute value change
notifications.
|
void |
setAttributeValue(IlpAttribute attribute,
Object value)
Sets the value of an attribute of this object.
|
void |
setAttributeValue(String name,
Object value)
Sets the value of an attribute of this object.
|
String |
toString()
Returns the identifier as a string.
|
public IlpBeansObject(Object bean, IlpClass ilpClass, Object identifier)
IlpObject instance to encapsulate the given bean.bean - The bean wrapped by this instance.ilpClass - The IlpClass that corresponds to the bean's Java class,
or a sub-IlpClass of an IlpBeansClass.identifier - The identifier of this instance.public Object getBean()
public IlpBeansClass getIlpBeansClass()
IlpClass of this object.public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic Object getIdentifier()
IlpObject.
This identifier is an Object that can be used to uniquely identify
and retrieve this IlpObjectgetIdentifier in interface IlpObjectIlpObjectIlpTypeConverterpublic IlpClass getIlpClass()
IlpClass of this object.getIlpClass in interface IlpObjectIlpClass of this object.public IlpAttributeGroup getAttributeGroup()
getAttributeGroup in interface IlpAttributeValueHolderpublic Object getAttributeValue(IlpAttribute attribute)
getAttributeValue in interface IlpAttributeValueHolderattribute - The attribute whose value is to be retrieved.public boolean hasAttributeValue(IlpAttribute a)
true if the requested attribute exists in the bean.hasAttributeValue in interface IlpAttributeValueHolderpublic void setAttributeValue(IlpAttribute attribute, Object value)
setAttributeValue in interface IlpAttributeValueHolderattribute - The attribute whose value is to be set.value - The new value of the attribute.public Object getAttributeValue(String name)
getAttributeValue in interface IlpAttributeValueHoldername - The name of the attribute whose value is to be retrieved.public void setAttributeValue(String name, Object value)
setAttributeValue in interface IlpAttributeValueHoldername - The name of the attribute whose value is to be changed.value - The new value of the attribute.public void addAttributeValueListener(AttributeValueListener l)
addAttributeValueListener in interface IlpAttributeValueHolderpublic void removeAttributeValueListener(AttributeValueListener l)
removeAttributeValueListener in interface IlpAttributeValueHolderpublic void fireEvent(AttributeValueEvent ev)
fireEvent in interface IlpAttributeValueHolderpublic void initializeDefaultValues()
initializeDefaultValues in interface IlpObject© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.