net.sf.beanlib.spi
Interface BeanTransformerSpi

All Superinterfaces:
BeanPopulatorBaseSpi, Transformable
All Known Implementing Classes:
BeanTransformer, Hibernate3BeanTransformer

public interface BeanTransformerSpi
extends Transformable, BeanPopulatorBaseSpi

Bean Transformer SPI.

Author:
Joe D. Velopar

Nested Class Summary
static interface BeanTransformerSpi.Factory
          Bean Transformer Factory SPI.
 
Method Summary
 ArrayReplicatorSpi getArrayReplicatable()
          Returns the current replicator for array.
 BeanPopulatorBaseConfig getBeanPopulatorBaseConfig()
          Returns all the configuration options as a single configuration object.
 BeanPopulatorSpi.Factory getBeanPopulatorSpiFactory()
          Returns the current bean populator factory, 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.
 BeanReplicatorSpi getBeanReplicatable()
          Returns the current replicator for JavaBeans.
 BlobReplicatorSpi getBlobReplicatable()
          Returns the current replicator for blobs.
 CalendarReplicatorSpi getCalendarReplicatable()
          Returns the current replicator for calendars.
<K,V> Map<K,V>
getClonedMap()
          Returns a map of those (from-to) objects that have been replicated.
 CollectionReplicatorSpi getCollectionReplicatable()
          Returns the current replicator for collections.
 CustomBeanTransformerSpi getCustomBeanTransformer()
          Returns the customer bean transformer, if any.
 DateReplicatorSpi getDateReplicatable()
          Returns the current replicator for dates.
 ImmutableReplicatorSpi getImmutableReplicatable()
          Returns the current replicator for immutables.
 MapReplicatorSpi getMapReplicatable()
          Returns the current replicator for maps.
 BeanTransformerSpi initArrayReplicatableFactory(ArrayReplicatorSpi.Factory arrayReplicatableFactory)
          Used to initialize the replicator factory for arrays.
 BeanTransformerSpi initBeanPopulationExceptionHandler(BeanPopulationExceptionHandler beanPopulationExceptionHandler)
          Used to configure a handler to handle any exception thrown.
 BeanTransformerSpi initBeanPopulatorBaseConfig(BeanPopulatorBaseConfig baseConfig)
          Used to conveniently provide all the other configuration options as a single configuration object.
 BeanTransformerSpi initBeanReplicatableFactory(BeanReplicatorSpi.Factory beanReplicatableFactory)
          Used to initialize the replicator factory for JavaBean's.
 BeanTransformerSpi 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.
 BeanTransformerSpi initBlobReplicatableFactory(BlobReplicatorSpi.Factory blobReplicatableFactory)
          Used to initialize the replicator factory for blob's.
 BeanTransformerSpi initCalendarReplicatableFactory(CalendarReplicatorSpi.Factory calendarReplicatableFactory)
          Used to initialize the replicator factory for calendars.
 BeanTransformerSpi initCollectionReplicatableFactory(CollectionReplicatorSpi.Factory collectionReplicatableFactory)
          Used to initialize the replicator factory for collections.
 BeanTransformerSpi initCustomTransformerFactory(CustomBeanTransformerSpi.Factory customTransformerFactory)
          Initializes with a custom transformer factory.
 BeanTransformerSpi initDateReplicatableFactory(DateReplicatorSpi.Factory dateReplicatableFactory)
          Used to initialize the replicator factory for dates.
 BeanTransformerSpi initDebug(boolean debug)
          Used to control whether debug messages should be logged.
 BeanTransformerSpi 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.
 BeanTransformerSpi initImmutableReplicatableFactory(ImmutableReplicatorSpi.Factory immutableReplicatableFactory)
          Used to initialize the replicator factory for immutables.
 BeanTransformerSpi initMapReplicatableFactory(MapReplicatorSpi.Factory mapReplicatableFactory)
          Used to initialize the replicator factory for maps.
 BeanTransformerSpi 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.
 BeanTransformerSpi initReaderMethodFinder(BeanMethodFinder readerMethodFinder)
          Used to configure a finder to find the property getter methods of a source JavaBean.
 BeanTransformerSpi initSetterMethodCollector(BeanMethodCollector setterMethodCollector)
          Used to configure a collector to collect the property setter methods of a target JavaBean.
 void reset()
          Reset the internal identity maps used to contain objects that have been replicated.
 
Methods inherited from interface net.sf.beanlib.spi.Transformable
transform
 
Methods inherited from interface net.sf.beanlib.spi.BeanPopulatorBaseSpi
getBeanPopulationExceptionHandler, getBeanSourceHandler, getDetailedPropertyFilter, getPropertyFilter, getReaderMethodFinder, getSetterMethodCollector, isDebug
 

Method Detail

initCustomTransformerFactory

BeanTransformerSpi initCustomTransformerFactory(CustomBeanTransformerSpi.Factory customTransformerFactory)
Initializes with a custom transformer factory.


getCustomBeanTransformer

CustomBeanTransformerSpi getCustomBeanTransformer()
Returns the customer bean transformer, if any. See initCustomTransformerFactory(net.sf.beanlib.spi.CustomBeanTransformerSpi.Factory)


reset

void reset()
Reset the internal identity maps used to contain objects that have been replicated. (Warning: Don't invoke this method unless you really know what you are doing.)


getClonedMap

<K,V> Map<K,V> getClonedMap()
Returns a map of those (from-to) objects that have been replicated. This map is internally used to resolve object identities and circular references in the object graph.


initImmutableReplicatableFactory

BeanTransformerSpi initImmutableReplicatableFactory(ImmutableReplicatorSpi.Factory immutableReplicatableFactory)
Used to initialize the replicator factory for immutables.


initCollectionReplicatableFactory

BeanTransformerSpi initCollectionReplicatableFactory(CollectionReplicatorSpi.Factory collectionReplicatableFactory)
Used to initialize the replicator factory for collections.


initMapReplicatableFactory

BeanTransformerSpi initMapReplicatableFactory(MapReplicatorSpi.Factory mapReplicatableFactory)
Used to initialize the replicator factory for maps.


initArrayReplicatableFactory

BeanTransformerSpi initArrayReplicatableFactory(ArrayReplicatorSpi.Factory arrayReplicatableFactory)
Used to initialize the replicator factory for arrays.


initBlobReplicatableFactory

BeanTransformerSpi initBlobReplicatableFactory(BlobReplicatorSpi.Factory blobReplicatableFactory)
Used to initialize the replicator factory for blob's.


initDateReplicatableFactory

BeanTransformerSpi initDateReplicatableFactory(DateReplicatorSpi.Factory dateReplicatableFactory)
Used to initialize the replicator factory for dates.


initCalendarReplicatableFactory

BeanTransformerSpi initCalendarReplicatableFactory(CalendarReplicatorSpi.Factory calendarReplicatableFactory)
Used to initialize the replicator factory for calendars.


initBeanReplicatableFactory

BeanTransformerSpi initBeanReplicatableFactory(BeanReplicatorSpi.Factory beanReplicatableFactory)
Used to initialize the replicator factory for JavaBean's.


getImmutableReplicatable

ImmutableReplicatorSpi getImmutableReplicatable()
Returns the current replicator for immutables.


getCollectionReplicatable

CollectionReplicatorSpi getCollectionReplicatable()
Returns the current replicator for collections.


getMapReplicatable

MapReplicatorSpi getMapReplicatable()
Returns the current replicator for maps.


getArrayReplicatable

ArrayReplicatorSpi getArrayReplicatable()
Returns the current replicator for array.


getBlobReplicatable

BlobReplicatorSpi getBlobReplicatable()
Returns the current replicator for blobs.


getDateReplicatable

DateReplicatorSpi getDateReplicatable()
Returns the current replicator for dates.


getCalendarReplicatable

CalendarReplicatorSpi getCalendarReplicatable()
Returns the current replicator for calendars.


getBeanReplicatable

BeanReplicatorSpi getBeanReplicatable()
Returns the current replicator for JavaBeans.


getBeanPopulatorSpiFactory

BeanPopulatorSpi.Factory getBeanPopulatorSpiFactory()
Returns the current bean populator factory, 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.


getBeanPopulatorBaseConfig

BeanPopulatorBaseConfig getBeanPopulatorBaseConfig()
Returns all the configuration options as a single configuration object.

Specified by:
getBeanPopulatorBaseConfig in interface BeanPopulatorBaseSpi

initPropertyFilter

BeanTransformerSpi initPropertyFilter(PropertyFilter propertyFilter)
Description copied from interface: BeanPopulatorBaseSpi
Used to configure a property filter to determine whether a specific property should be propagated from a source bean to a target bean.

Specified by:
initPropertyFilter in interface BeanPopulatorBaseSpi
Parameters:
propertyFilter - 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.
Returns:
the current object (ie this) for method chaining purposes.

initDetailedPropertyFilter

BeanTransformerSpi initDetailedPropertyFilter(DetailedPropertyFilter detailedPropertyFilter)
Description copied from interface: BeanPopulatorBaseSpi
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.

Specified by:
initDetailedPropertyFilter in interface BeanPopulatorBaseSpi
Parameters:
detailedPropertyFilter - is used to control whether a specific property should be propagated from the source bean to the target bean.
Returns:
the current object (ie this) for method chaining purposes.

initBeanSourceHandler

BeanTransformerSpi initBeanSourceHandler(BeanSourceHandler beanSourceHandler)
Description copied from interface: BeanPopulatorBaseSpi
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.

Specified by:
initBeanSourceHandler in interface BeanPopulatorBaseSpi
Parameters:
beanSourceHandler - 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.
Returns:
the current object (ie this) for method chaining purposes.

initReaderMethodFinder

BeanTransformerSpi initReaderMethodFinder(BeanMethodFinder readerMethodFinder)
Description copied from interface: BeanPopulatorBaseSpi
Used to configure a finder to find the property getter methods of a source JavaBean.

Specified by:
initReaderMethodFinder in interface BeanPopulatorBaseSpi
Parameters:
readerMethodFinder - can be used to find the property getter methods of a source JavaBean.
Returns:
the current object (ie this) for method chaining purposes.

initSetterMethodCollector

BeanTransformerSpi initSetterMethodCollector(BeanMethodCollector setterMethodCollector)
Description copied from interface: BeanPopulatorBaseSpi
Used to configure a collector to collect the property setter methods of a target JavaBean.

Specified by:
initSetterMethodCollector in interface BeanPopulatorBaseSpi
Parameters:
setterMethodCollector - can be used to collect the property setter methods of a target JavaBean.
Returns:
the current object (ie this) for method chaining purposes.

initBeanPopulationExceptionHandler

BeanTransformerSpi initBeanPopulationExceptionHandler(BeanPopulationExceptionHandler beanPopulationExceptionHandler)
Description copied from interface: BeanPopulatorBaseSpi
Used to configure a handler to handle any exception thrown.

Specified by:
initBeanPopulationExceptionHandler in interface BeanPopulatorBaseSpi
Parameters:
beanPopulationExceptionHandler - can be used to handle any exception thrown.
Returns:
the current object (ie this) for method chaining purposes.

initDebug

BeanTransformerSpi initDebug(boolean debug)
Description copied from interface: BeanPopulatorBaseSpi
Used to control whether debug messages should be logged.

Specified by:
initDebug in interface BeanPopulatorBaseSpi
Returns:
the current object (ie this) for method chaining purposes.

initBeanPopulatorBaseConfig

BeanTransformerSpi initBeanPopulatorBaseConfig(BeanPopulatorBaseConfig baseConfig)
Description copied from interface: BeanPopulatorBaseSpi
Used to conveniently provide all the other configuration options as a single configuration object.

Specified by:
initBeanPopulatorBaseConfig in interface BeanPopulatorBaseSpi
Parameters:
baseConfig - is used to conveniently group all the other initializable options into a single unit.
Returns:
the current object (ie this) for method chaining purposes.