jve.generated
Class JavaBeanDataObject

java.lang.Object
  extended byjve.generated.ObjectReference
      extended byjve.generated.BasicDataObject
          extended byjve.generated.JavaBeanDataObject
All Implemented Interfaces:
IBoundObject, IDataObject

public class JavaBeanDataObject
extends BasicDataObject

This DataObject will provide an instance of the given Java Bean as a data object. Invoking the refresh() method will discard the existing instance and create a new one.


Field Summary
 
Fields inherited from class jve.generated.ObjectReference
debug
 
Fields inherited from interface jve.generated.IBoundObject
DELIMITER, PROPERTY_OBJ_CHANGED
 
Constructor Summary
JavaBeanDataObject()
           
 
Method Summary
 java.lang.String getClassName()
          Get the fully-qualified class name of the target Java bean
 java.lang.Object getObject()
          Get the instance of the target Java Bean.
 java.lang.Class getType()
          Get the class type of the target Java Bean (specified by setClassName())
 void refresh()
          Replace the existing instance of the Java Bean with a new instance.
 void setClassName(java.lang.String className)
          Set the fully-qualified class name of the target Java bean.
 java.lang.String toString()
           
 
Methods inherited from class jve.generated.BasicDataObject
getValue, isPrimitive, isReadOnly, setSourceObject, setValue
 
Methods inherited from class jve.generated.ObjectReference
actionPerformed, addPropertyChangeListener, getProperty, getSourceObject, removePropertyChangeListener, setProperty, setSourceObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jve.generated.IBoundObject
actionPerformed, addPropertyChangeListener, getProperty, getSourceObject, removePropertyChangeListener, setProperty, setSourceObject
 

Constructor Detail

JavaBeanDataObject

public JavaBeanDataObject()
Method Detail

getObject

public java.lang.Object getObject()
Get the instance of the target Java Bean. This method will lazily instantiate the Java Bean as needed (whenever the target object is null).

Specified by:
getObject in interface IBoundObject
Overrides:
getObject in class ObjectReference
Returns:
the target object

refresh

public void refresh()
Replace the existing instance of the Java Bean with a new instance.

Specified by:
refresh in interface IBoundObject
Overrides:
refresh in class BasicDataObject
Returns:
the new instance of the Java Bean

getType

public java.lang.Class getType()
                        throws java.lang.IllegalArgumentException
Get the class type of the target Java Bean (specified by setClassName())

Specified by:
getType in interface IBoundObject
Overrides:
getType in class ObjectReference
Returns:
the target class
Throws:
java.lang.IllegalArgumentException - if the bean class is not valid

getClassName

public java.lang.String getClassName()
Get the fully-qualified class name of the target Java bean

Returns:
Returns the class name.

setClassName

public void setClassName(java.lang.String className)
Set the fully-qualified class name of the target Java bean. This class must be public, be able to be instantiated in the current project, and have a public no-argument constructor.

Parameters:
className - The class name to set.
Throws:
java.lang.IllegalArgumentException - if the specificed class cannot be found or does not have a public null constructor.

toString

public java.lang.String toString()
Overrides:
toString in class BasicDataObject