|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BeanPopulatorSpi
Bean Populator SPI. This SPI provides various options to control the propagation behavior of JavaBean properties.
BeanPopulatorBaseSpi| Nested Class Summary | |
|---|---|
static interface |
BeanPopulatorSpi.Factory
Bean Populator Factory SPI, which is used to create a bean populator which can then be used to determine whether a specific JavaBean property should be propagated from a source bean to a target bean. |
| Method Summary | ||
|---|---|---|
Transformable |
getTransformer()
Returns the transformer used by this bean populator. |
|
BeanPopulatorSpi |
initBeanPopulationExceptionHandler(BeanPopulationExceptionHandler beanPopulationExceptionHandler)
Used to configure a handler to handle any exception thrown. |
|
BeanPopulatorSpi |
initBeanPopulatorBaseConfig(BeanPopulatorBaseConfig baseConfig)
Used to conveniently provide all the other configuration options as a single configuration object. |
|
BeanPopulatorSpi |
initBeanSourceHandler(BeanSourceHandler beanSourceHandler)
Used to configure a call-back (to produce whatever side-effects deemed necessary) that is invoked after the property value has been retrieved from the source bean, but before being propagated across to the target bean. |
|
BeanPopulatorSpi |
initDebug(boolean debug)
Used to control whether debug messages should be logged. |
|
BeanPopulatorSpi |
initDetailedPropertyFilter(DetailedPropertyFilter detailedPropertyFilter)
Used to configure a detailed prperty filter (which has more context information) to determine whether a specific property should be propagated from the source bean to the target bean. |
|
BeanPopulatorSpi |
initPropertyFilter(PropertyFilter propertyFilter)
Used to configure a property filter to determine whether a specific property should be propagated from a source bean to a target bean. |
|
BeanPopulatorSpi |
initReaderMethodFinder(BeanMethodFinder readerMethodFinder)
Used to configure a finder to find the property getter methods of a source JavaBean. |
|
BeanPopulatorSpi |
initSetterMethodCollector(BeanMethodCollector setterMethodCollector)
Used to configure a collector to collect the property setter methods of a target JavaBean. |
|
BeanPopulatorSpi |
initTransformer(Transformable transformer)
Used to configure a transformer to transform a property value read from a source JavaBean into a value to be to set the corresponding property of a target JavaBean. |
|
|
populate()
Propagates properties from the source JavaBean to the target JavaBean. |
|
| Methods inherited from interface net.sf.beanlib.spi.BeanPopulatorBaseSpi |
|---|
getBeanPopulationExceptionHandler, getBeanPopulatorBaseConfig, getBeanSourceHandler, getDetailedPropertyFilter, getPropertyFilter, getReaderMethodFinder, getSetterMethodCollector, isDebug |
| Method Detail |
|---|
BeanPopulatorSpi initTransformer(Transformable transformer)
transformer - is used to transform every property value read from a source JavaBean
into a value to be to set the corresponding property of a target JavaBean.
Transformable getTransformer()
<T> T populate()
BeanPopulatorSpi initPropertyFilter(PropertyFilter propertyFilter)
BeanPopulatorBaseSpi
initPropertyFilter in interface BeanPopulatorBaseSpipropertyFilter - is similar to DetailedPropertyFilter but with a simpler API
that is used to control whether a specific property should be propagated
from a source bean to a target bean.
BeanPopulatorSpi initDetailedPropertyFilter(DetailedPropertyFilter detailedPropertyFilter)
BeanPopulatorBaseSpi
initDetailedPropertyFilter in interface BeanPopulatorBaseSpidetailedPropertyFilter - is used to control whether a specific property
should be propagated from the source bean to the target bean.
BeanPopulatorSpi initBeanSourceHandler(BeanSourceHandler beanSourceHandler)
BeanPopulatorBaseSpi
initBeanSourceHandler in interface BeanPopulatorBaseSpibeanSourceHandler - can be used to act as a call-back
(to produce whatever side-effects deemed necessary)
after the property value has been retrieved from the source bean,
but before being propagated across to the target bean.
BeanPopulatorSpi initReaderMethodFinder(BeanMethodFinder readerMethodFinder)
BeanPopulatorBaseSpi
initReaderMethodFinder in interface BeanPopulatorBaseSpireaderMethodFinder - can be used to find the property getter methods of a source JavaBean.
BeanPopulatorSpi initSetterMethodCollector(BeanMethodCollector setterMethodCollector)
BeanPopulatorBaseSpi
initSetterMethodCollector in interface BeanPopulatorBaseSpisetterMethodCollector - can be used to collect the property setter methods of a target JavaBean.
BeanPopulatorSpi initDebug(boolean debug)
BeanPopulatorBaseSpi
initDebug in interface BeanPopulatorBaseSpiBeanPopulatorSpi initBeanPopulationExceptionHandler(BeanPopulationExceptionHandler beanPopulationExceptionHandler)
BeanPopulatorBaseSpi
initBeanPopulationExceptionHandler in interface BeanPopulatorBaseSpibeanPopulationExceptionHandler - can be used to handle any exception thrown.
BeanPopulatorSpi initBeanPopulatorBaseConfig(BeanPopulatorBaseConfig baseConfig)
BeanPopulatorBaseSpi
initBeanPopulatorBaseConfig in interface BeanPopulatorBaseSpibaseConfig - is used to conveniently group all the other initializable options into a single unit.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||