|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.beanlib.hibernate.HibernateBeanReplicator
public class HibernateBeanReplicator
Hibernate Bean Replicator. Not thread safe.
Field Summary | |
---|---|
private BeanPopulatable |
beanPopulatable
|
private Set<? extends CollectionPropertyName> |
collectionPropertyNameSet
|
private Set<Class> |
entityBeanClassSet
|
private BeanTransformerSpi |
hibernateBeanTransformer
|
private BeanPopulatable |
vetoer
|
Constructor Summary | |
---|---|
HibernateBeanReplicator(BeanTransformerSpi hibernateBeanTransformer)
|
Method Summary | ||
---|---|---|
|
copy(Object from,
Class<T> toClass)
Returns an instance of the given class with values copied from the given object. |
|
|
copy(T from)
Returns a copy of the given object. |
|
|
deepCopy(Object from,
Class<T> toClass)
Convenient method to deep copy the given object to an instance of the given class using the default behavior. |
|
|
deepCopy(T from)
Convenient method to deep copy the given object using the default behavior. |
|
BeanPopulatable |
getBeanPopulatable()
|
|
Set |
getCollectionPropertyNameSet()
|
|
Set |
getEntityBeanClassSet()
|
|
BeanPopulatable |
getVetoer()
|
|
HibernateBeanReplicator |
initBeanPopulatable(BeanPopulatable beanPopulatable)
|
|
HibernateBeanReplicator |
initBeanSourceHandler(BeanSourceHandler beanSourceHandler)
|
|
HibernateBeanReplicator |
initCollectionPropertyNameSet(Set<? extends CollectionPropertyName> collectionPropertyNameSet)
Used to specify the set of Collection fields to be populated. |
|
HibernateBeanReplicator |
initCustomTransformer(CustomBeanTransformerSpi.Factory customTransformerFactory)
|
|
HibernateBeanReplicator |
initDebug(boolean debug)
|
|
HibernateBeanReplicator |
initDetailedBeanPopulatable(DetailedBeanPopulatable detailedBeanPopulatable)
|
|
HibernateBeanReplicator |
initEntityBeanClassSet(Set<Class> entityBeanClassSet)
Used to specify the set of entity beans to be populated. |
|
HibernateBeanReplicator |
initSetterMethodCollector(BeanMethodCollector setterMethodFinder)
|
|
HibernateBeanReplicator |
initVetoer(BeanPopulatable vetoer)
|
|
private void |
setDefaultBehavior()
|
|
HibernateBeanReplicator |
setReaderMethodFinder(BeanMethodFinder readerMethodFinder)
|
|
|
shallowCopy(Object from,
Class<T> toClass)
Convenient method to shallow copy the given object to an instance of the given class using the default behavior. |
|
|
shallowCopy(T from)
Convenient method to shallow copy the given object using the default behavior. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final BeanTransformerSpi hibernateBeanTransformer
private Set<Class> entityBeanClassSet
private Set<? extends CollectionPropertyName> collectionPropertyNameSet
private BeanPopulatable beanPopulatable
private BeanPopulatable vetoer
Constructor Detail |
---|
public HibernateBeanReplicator(BeanTransformerSpi hibernateBeanTransformer)
Method Detail |
---|
public final <T> T copy(T from)
T
- type of the given object.from
- given object.public final <T> T copy(Object from, Class<T> toClass)
T
- type of the given object.from
- given object.toClass
- target class of the returned object.public final <T> T deepCopy(T from)
DetailedBeanPopulatable
or BeanMethodCollector
.
T
- from object type.from
- given object to be copied.
public final <T> T deepCopy(Object from, Class<T> toClass)
DetailedBeanPopulatable
or BeanMethodCollector
.
T
- to object type.from
- given object to be copied.toClass
- target class of the returned object.
public final <T> T shallowCopy(T from)
DetailedBeanPopulatable
or BeanMethodCollector
.
T
- from object type.from
- given object to be copied.
public final <T> T shallowCopy(Object from, Class<T> toClass)
DetailedBeanPopulatable
or BeanMethodCollector
.
T
- to object type.from
- given object to be copied.
private void setDefaultBehavior()
public final BeanPopulatable getBeanPopulatable()
public final HibernateBeanReplicator initBeanPopulatable(BeanPopulatable beanPopulatable)
public final HibernateBeanReplicator initCustomTransformer(CustomBeanTransformerSpi.Factory customTransformerFactory)
public final HibernateBeanReplicator initBeanSourceHandler(BeanSourceHandler beanSourceHandler)
public final HibernateBeanReplicator initDebug(boolean debug)
public final HibernateBeanReplicator initDetailedBeanPopulatable(DetailedBeanPopulatable detailedBeanPopulatable)
public final Set getEntityBeanClassSet()
public final HibernateBeanReplicator initEntityBeanClassSet(Set<Class> entityBeanClassSet)
entityBeanClassSet
- the set of entity beans to be populated;
or null if all entity bean are to be populated.
public final Set getCollectionPropertyNameSet()
public final HibernateBeanReplicator initCollectionPropertyNameSet(Set<? extends CollectionPropertyName> collectionPropertyNameSet)
collectionPropertyNameSet
- the set of Collection fields to be populated;
or null if all Collection fields are to be populated.
public final BeanPopulatable getVetoer()
public final HibernateBeanReplicator initVetoer(BeanPopulatable vetoer)
public final HibernateBeanReplicator setReaderMethodFinder(BeanMethodFinder readerMethodFinder)
public final HibernateBeanReplicator initSetterMethodCollector(BeanMethodCollector setterMethodFinder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |