net.sf.beanlib.hibernate3
Class Hibernate3JavaBeanReplicator

java.lang.Object
  extended by net.sf.beanlib.provider.replicator.ReplicatorTemplate
      extended by net.sf.beanlib.provider.replicator.BeanReplicator
          extended by net.sf.beanlib.hibernate3.Hibernate3JavaBeanReplicator
All Implemented Interfaces:
BeanReplicatorSpi

public class Hibernate3JavaBeanReplicator
extends BeanReplicator

Hibernate 3 specific JavaBean Replicator.

Author:
Joe D. Velopar

Nested Class Summary
static class Hibernate3JavaBeanReplicator.Factory
          Factory for Hibernate3JavaBeanReplicator
 
Field Summary
private static Hibernate3JavaBeanReplicator.Factory factory
           
 
Fields inherited from class net.sf.beanlib.provider.replicator.ReplicatorTemplate
log
 
Constructor Summary
protected Hibernate3JavaBeanReplicator(BeanTransformerSpi beanTransformer)
           
 
Method Summary
protected
<T> T
createToInstance(Object from, Class<T> toClass)
           
static Hibernate3JavaBeanReplicator.Factory getFactory()
           
static Hibernate3JavaBeanReplicator newBeanReplicatable(BeanTransformerSpi beanTransformer)
           
<V,T> T
replicateBean(V from, Class<T> toClass)
          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.
 
Methods inherited from class net.sf.beanlib.provider.replicator.BeanReplicator
newBeanReplicatable, replicateBean, replicateBean
 
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
 

Field Detail

factory

private static final Hibernate3JavaBeanReplicator.Factory factory
Constructor Detail

Hibernate3JavaBeanReplicator

protected Hibernate3JavaBeanReplicator(BeanTransformerSpi beanTransformer)
Method Detail

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 type
T - target type
Parameters:
from - from bean (after unenhancement) to be replicated
toClass - target class to be instantiated