net.sf.beanlib.hibernate3
Class LazyHibernateCustomBeanTransformer

java.lang.Object
  extended by net.sf.beanlib.hibernate3.LazyHibernateCustomBeanTransformer
All Implemented Interfaces:
net.sf.beanlib.spi.CustomBeanTransformerSpi, net.sf.beanlib.spi.Transformable

public class LazyHibernateCustomBeanTransformer
extends java.lang.Object
implements net.sf.beanlib.spi.CustomBeanTransformerSpi

A convenient custom bean transformer that can be used to replicate only the initialized properties/associations in a Hibernate object graph.

Sample Usage:

 HibernateBeanReplicator replicator = new Hibernate3BeanReplicator();
 replicator.initCustomTransformerFactory(new LazyHibernateCustomBeanTransformer.Factory());
 replicator.deepCopy(...);
 


Nested Class Summary
static class LazyHibernateCustomBeanTransformer.Factory
          The factory for a LazyHibernateCustomBeanTransformer.
 
Constructor Summary
LazyHibernateCustomBeanTransformer()
           
 
Method Summary
 boolean isTransformable(java.lang.Object from, java.lang.Class<?> toClass, net.sf.beanlib.PropertyInfo propertyInfo)
           
<T> T
transform(java.lang.Object in, java.lang.Class<T> toClass, net.sf.beanlib.PropertyInfo propertyInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyHibernateCustomBeanTransformer

public LazyHibernateCustomBeanTransformer()
Method Detail

isTransformable

public boolean isTransformable(java.lang.Object from,
                               java.lang.Class<?> toClass,
                               net.sf.beanlib.PropertyInfo propertyInfo)
Specified by:
isTransformable in interface net.sf.beanlib.spi.CustomBeanTransformerSpi

transform

public <T> T transform(java.lang.Object in,
                       java.lang.Class<T> toClass,
                       net.sf.beanlib.PropertyInfo propertyInfo)
Specified by:
transform in interface net.sf.beanlib.spi.Transformable


Copyright © 2009. All Rights Reserved.