net.sf.beanlib.hibernate3
Class Hibernate3JavaBeanReplicator
java.lang.Object
net.sf.beanlib.provider.replicator.ReplicatorTemplate
net.sf.beanlib.provider.replicator.BeanReplicator
net.sf.beanlib.hibernate3.Hibernate3JavaBeanReplicator
- All Implemented Interfaces:
- BeanReplicatorSpi
public class Hibernate3JavaBeanReplicator
- extends BeanReplicator
Hibernate 3 specific JavaBean Replicator.
- Author:
- Joe D. Velopar
Methods inherited from class net.sf.beanlib.provider.replicator.ReplicatorTemplate |
chooseClass, createToInstance, createToInstanceWithComparator, getTargetCloned, newInstanceAsPrivileged, populateBean, putTargetCloned, replicate, replicate, replicateByBeanReplicatable, transform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
private static final Hibernate3JavaBeanReplicator.Factory factory
Hibernate3JavaBeanReplicator
protected Hibernate3JavaBeanReplicator(BeanTransformerSpi beanTransformer)
getFactory
public static Hibernate3JavaBeanReplicator.Factory getFactory()
newBeanReplicatable
public static Hibernate3JavaBeanReplicator newBeanReplicatable(BeanTransformerSpi beanTransformer)
createToInstance
protected <T> T createToInstance(Object from,
Class<T> toClass)
throws InstantiationException,
IllegalAccessException,
SecurityException,
NoSuchMethodException
- Overrides:
createToInstance
in class ReplicatorTemplate
- Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchMethodException
replicateBean
public <V,T> T replicateBean(V from,
Class<T> toClass)
- Description copied from class:
BeanReplicator
- Replicates the properties of a JavaBean object to an instance of a target class,
which is selected from the given "from" and "to" classes, giving
priority to the one which is more specific whenever possible.
- Specified by:
replicateBean
in interface BeanReplicatorSpi
- Overrides:
replicateBean
in class BeanReplicator
- Type Parameters:
V
- from typeT
- target type- Parameters:
from
- from bean (after unenhancement) to be replicatedtoClass
- target class to be instantiated