net.sf.beanlib.spi
Class BeanPopulationExceptionHandlerAdapter

java.lang.Object
  extended by net.sf.beanlib.spi.BeanPopulationExceptionHandlerAdapter
All Implemented Interfaces:
BeanPopulationExceptionHandler

public class BeanPopulationExceptionHandlerAdapter
extends Object
implements BeanPopulationExceptionHandler

Adapter class for BeanPopulationExceptionHandler.

Author:
Joe D. Velopar

Field Summary
protected  Object fromBean
           
protected  String propertyName
           
protected  Method readerMethod
           
protected  Method setterMethod
           
protected  Object toBean
           
 
Fields inherited from interface net.sf.beanlib.spi.BeanPopulationExceptionHandler
ABORT, CONTINUE
 
Constructor Summary
BeanPopulationExceptionHandlerAdapter()
           
 
Method Summary
 void handleException(Throwable t, Log log)
          Handles the exception thrown during the population of a bean property.
 BeanPopulationExceptionHandlerAdapter initFromBean(Object fromBean)
          Sets the bean from which the property is populated from, ie the source bean.
 BeanPopulationExceptionHandlerAdapter initPropertyName(String propertyName)
          Sets the name of the property being populated.
 BeanPopulationExceptionHandlerAdapter initReaderMethod(Method readerMethod)
          Sets the reader method used to retreive the value from the source bean.
 BeanPopulationExceptionHandlerAdapter initSetterMethod(Method setterMethod)
          Sets the setter method used to set the value to the target bean.
 BeanPopulationExceptionHandlerAdapter initToBean(Object toBean)
          Sets the bean to which the property is populated to, ie the target bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyName

protected String propertyName

fromBean

protected Object fromBean

readerMethod

protected Method readerMethod

toBean

protected Object toBean

setterMethod

protected Method setterMethod
Constructor Detail

BeanPopulationExceptionHandlerAdapter

public BeanPopulationExceptionHandlerAdapter()
Method Detail

handleException

public void handleException(Throwable t,
                            Log log)
Description copied from interface: BeanPopulationExceptionHandler
Handles the exception thrown during the population of a bean property.

Specified by:
handleException in interface BeanPopulationExceptionHandler

initPropertyName

public BeanPopulationExceptionHandlerAdapter initPropertyName(String propertyName)
Description copied from interface: BeanPopulationExceptionHandler
Sets the name of the property being populated.

Specified by:
initPropertyName in interface BeanPopulationExceptionHandler

initFromBean

public BeanPopulationExceptionHandlerAdapter initFromBean(Object fromBean)
Description copied from interface: BeanPopulationExceptionHandler
Sets the bean from which the property is populated from, ie the source bean.

Specified by:
initFromBean in interface BeanPopulationExceptionHandler

initReaderMethod

public BeanPopulationExceptionHandlerAdapter initReaderMethod(Method readerMethod)
Description copied from interface: BeanPopulationExceptionHandler
Sets the reader method used to retreive the value from the source bean.

Specified by:
initReaderMethod in interface BeanPopulationExceptionHandler

initToBean

public BeanPopulationExceptionHandlerAdapter initToBean(Object toBean)
Description copied from interface: BeanPopulationExceptionHandler
Sets the bean to which the property is populated to, ie the target bean.

Specified by:
initToBean in interface BeanPopulationExceptionHandler

initSetterMethod

public BeanPopulationExceptionHandlerAdapter initSetterMethod(Method setterMethod)
Description copied from interface: BeanPopulationExceptionHandler
Sets the setter method used to set the value to the target bean.

Specified by:
initSetterMethod in interface BeanPopulationExceptionHandler