|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.beanlib.hibernate3.Hibernate3DtoCopier
public class Hibernate3DtoCopier
Convenient class for converting application specific Hibernate 3 persistence object to DTO.
Nested Class Summary | |
---|---|
static class |
Hibernate3DtoCopier.Factory
Factory for Hibernate3DtoCopier . |
Field Summary | |
---|---|
private String |
applicationPackagePrefix
|
Constructor Summary | |
---|---|
private |
Hibernate3DtoCopier()
Must be constructed only via the factory. |
Method Summary | ||
---|---|---|
private
|
copy(Class<E> targetEntityType,
Object from,
Class[] entityBeanClassArray)
|
|
private
|
copy(Class<E> targetEntityType,
Object from,
Class[] entityBeanClassArray,
CollectionPropertyName[] collectionPropertyNameArray)
|
|
private Object |
copy(Object from,
Class[] entityBeanClassArray)
Copy with a Application specific BeanPopulatable excluding all member Set properties. |
|
protected Hibernate3BeanReplicator |
createHibernateBeanReplicator()
|
|
|
hibernate2dto(Class<E> targetEntityType,
Collection hibernateBeans,
Class[] interestedEntityTypes,
CollectionPropertyName[] collectionPropertyNameArray)
Returns a list of DTO's by cloning portion of the object graph of the given collection of Hibernate beans. |
|
|
hibernate2dto(Class<E> targetEntityType,
T entityBean)
|
|
|
hibernate2dto(Class<E> targetEntityType,
T entityBean,
Class[] interestedEntityTypes,
CollectionPropertyName[] collectionPropertyNames)
|
|
List |
hibernate2dto(Collection hibernateBeans)
Returns a list of DTO's by cloning portion of the object graph of the given collection of Hibernate beans. |
|
|
hibernate2dto(T entityBean)
Returns a DTO by cloning portion of the object graph of the given Hibernate bean. |
|
|
hibernate2dto(T entityBean,
Class[] interestedEntityTypes,
CollectionPropertyName[] collectionPropertyNames)
Returns a DTO by cloning portion of the object graph of the given Hibernate bean. |
|
List |
hibernate2dtoFully(Collection hibernateBeans)
Returns a list of DTO's by deep cloning the given collection of Hibernate beans. |
|
|
hibernate2dtoFully(T entityBean)
Returns a DTO by deep cloning the given Hibernate bean. |
|
protected Hibernate3DtoCopier |
init(String applicationPackagePrefix,
Class applicationSampleClass)
Used to specify the application package prefix, with a sample application class for verification purposes. |
|
boolean |
isApplicationClass(Class c)
Returns true iff c is a application class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String applicationPackagePrefix
Constructor Detail |
---|
private Hibernate3DtoCopier()
Method Detail |
---|
protected Hibernate3BeanReplicator createHibernateBeanReplicator()
protected Hibernate3DtoCopier init(String applicationPackagePrefix, Class applicationSampleClass)
public <T> T hibernate2dtoFully(T entityBean)
public List hibernate2dtoFully(Collection hibernateBeans)
public <T> T hibernate2dto(T entityBean)
entityBean
- given Hibernate Beanpublic <E,T> E hibernate2dto(Class<E> targetEntityType, T entityBean)
public <T> T hibernate2dto(T entityBean, Class[] interestedEntityTypes, CollectionPropertyName[] collectionPropertyNames)
entityBean
- given Hibernate BeancollectionPropertyNames
- set properties to be included in the object graphpublic <E,T> E hibernate2dto(Class<E> targetEntityType, T entityBean, Class[] interestedEntityTypes, CollectionPropertyName[] collectionPropertyNames)
public List hibernate2dto(Collection hibernateBeans)
hibernateBeans
- given collection of Hibernate Beans.public <E> List<E> hibernate2dto(Class<E> targetEntityType, Collection hibernateBeans, Class[] interestedEntityTypes, CollectionPropertyName[] collectionPropertyNameArray)
hibernateBeans
- given collection of Hibernate Beans.private Object copy(Object from, Class[] entityBeanClassArray)
private <E> E copy(Class<E> targetEntityType, Object from, Class[] entityBeanClassArray)
private <E> E copy(Class<E> targetEntityType, Object from, Class[] entityBeanClassArray, CollectionPropertyName[] collectionPropertyNameArray)
public boolean isApplicationClass(Class c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |