Package net.sf.beanlib.spi

Examples of net.sf.beanlib.spi.BeanTransformerSpi


    {
    BeanPopulator replicator = BeanPopulator.newBeanPopulator(from, to);
   
  //  Change bean class replicator
  //
    BeanTransformerSpi transformer = (BeanTransformerSpi) replicator.getTransformer();
    transformer.initBeanReplicatable(MergeClassBeanReplicator.factory);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setClassMapper(classMapper);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setPersistenceUtil(persistenceUtil);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setProxyStore(proxyStore);
   
    transformer.initCollectionReplicatable(MergeCollectionReplicator.factory);
    ((MergeCollectionReplicator) transformer.getCollectionReplicatable()).setPersistenceUtil(persistenceUtil);
   
    transformer.initMapReplicatable(MergeMapReplicator.factory);
    ((MergeMapReplicator) transformer.getMapReplicatable()).setPersistenceUtil(persistenceUtil);
   
  //  Custom transformers (timestamp handling)
  //
        transformer.initCustomTransformerFactory(new CustomBeanTransformerSpi.Factory()
    {
      public CustomBeanTransformerSpi newCustomBeanTransformer(final BeanTransformerSpi beanTransformer)
      {
        return CustomTransformersFactory.getInstance().createUnionCustomBeanTransformer(beanTransformer);
      }
View Full Code Here


    {
    BeanPopulator replicator = BeanPopulator.newBeanPopulator(from, to);
   
  //  Change bean class replicator
  //
    BeanTransformerSpi transformer = (BeanTransformerSpi) replicator.getTransformer();
    transformer.initBeanReplicatable(MergeClassBeanReplicator.factory);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setClassMapper(classMapper);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setPersistenceUtil(persistenceUtil);
    ((MergeClassBeanReplicator) transformer.getBeanReplicatable()).setPojoStore(pojoStore);
   
    transformer.initCollectionReplicatable(MergeCollectionReplicator.factory);
    ((MergeCollectionReplicator) transformer.getCollectionReplicatable()).setPersistenceUtil(persistenceUtil);
   
    transformer.initMapReplicatable(MergeMapReplicator.factory);
    ((MergeMapReplicator) transformer.getMapReplicatable()).setPersistenceUtil(persistenceUtil);
   
  //  Timestamp handling
  //
    transformer.initCustomTransformer(new CustomBeanTransformerSpi.Factory()
    {
      public CustomBeanTransformerSpi newCustomBeanTransformer(final BeanTransformerSpi beanTransformer)
      {
        return new TimestampCustomTransformer(beanTransformer);
      }
View Full Code Here

TOP

Related Classes of net.sf.beanlib.spi.BeanTransformerSpi

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.