net.sf.beanlib.spi
Interface BeanPopulationExceptionHandler

All Known Implementing Classes:
AbstractBeanPopulationExceptionHandler, BeanPopulationExceptionHandlerAdapter

public interface BeanPopulationExceptionHandler

Used to handle exception thrown during the population of a bean property.

Author:
Joe D. Velopar

Field Summary
static BeanPopulationExceptionHandler ABORT
          Exception handler which aborts by throwing or re-throwing a RuntimeException or Error.
static BeanPopulationExceptionHandler CONTINUE
          Exception handler which always continue by logging and then igoring the exception or error.
 
Method Summary
 void handleException(Throwable t, Log log)
          Handles the exception thrown during the population of a bean property.
 BeanPopulationExceptionHandler initFromBean(Object fromBean)
          Sets the bean from which the property is populated from, ie the source bean.
 BeanPopulationExceptionHandler initPropertyName(String propertyName)
          Sets the name of the property being populated.
 BeanPopulationExceptionHandler initReaderMethod(Method readerMethod)
          Sets the reader method used to retreive the value from the source bean.
 BeanPopulationExceptionHandler initSetterMethod(Method setterMethod)
          Sets the setter method used to set the value to the target bean.
 BeanPopulationExceptionHandler initToBean(Object toBean)
          Sets the bean to which the property is populated to, ie the target bean.
 

Field Detail

ABORT

static final BeanPopulationExceptionHandler ABORT
Exception handler which aborts by throwing or re-throwing a RuntimeException or Error.


CONTINUE

static final BeanPopulationExceptionHandler CONTINUE
Exception handler which always continue by logging and then igoring the exception or error.

Method Detail

handleException

void handleException(Throwable t,
                     Log log)
Handles the exception thrown during the population of a bean property.


initPropertyName

BeanPopulationExceptionHandler initPropertyName(String propertyName)
Sets the name of the property being populated.


initFromBean

BeanPopulationExceptionHandler initFromBean(Object fromBean)
Sets the bean from which the property is populated from, ie the source bean.


initReaderMethod

BeanPopulationExceptionHandler initReaderMethod(Method readerMethod)
Sets the reader method used to retreive the value from the source bean.


initToBean

BeanPopulationExceptionHandler initToBean(Object toBean)
Sets the bean to which the property is populated to, ie the target bean.


initSetterMethod

BeanPopulationExceptionHandler initSetterMethod(Method setterMethod)
Sets the setter method used to set the value to the target bean.