net.sf.beanlib.hibernate3
Class Hibernate3DtoPopulator

java.lang.Object
  extended by net.sf.beanlib.hibernate3.Hibernate3DtoPopulator
All Implemented Interfaces:
BeanPopulatable

 class Hibernate3DtoPopulator
extends Object
implements BeanPopulatable

Used by Hibernate3DtoCopier to dynamically expand the set of application entity classes as necessary, including those classes discovered from the element type of collection properties.

Author:
Joe D. Velopar

Field Summary
private  Hibernate3DtoCopier applicationBeanCopier
           
private  Set<CollectionPropertyName> collectionPropertyNameSet
           
private  Set<Class> entityBeanClassSet
           
 
Constructor Summary
Hibernate3DtoPopulator()
           
Hibernate3DtoPopulator(Set<Class> entityBeanClassSet, Set<CollectionPropertyName> collectionPropertyNameSet)
           
Hibernate3DtoPopulator(Set<CollectionPropertyName> collectionPropertyNameSet)
           
 
Method Summary
private  boolean checkCollectionProperty(String propertyName, Method readerMethod)
           
(package private)  Hibernate3DtoPopulator init(Hibernate3DtoCopier applicationBeanCopier)
           
 boolean shouldPopulate(String propertyName, Method readerMethod)
          Returns true if the given JavaBean property should be populated; false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityBeanClassSet

private final Set<Class> entityBeanClassSet

collectionPropertyNameSet

private final Set<CollectionPropertyName> collectionPropertyNameSet

applicationBeanCopier

private Hibernate3DtoCopier applicationBeanCopier
Constructor Detail

Hibernate3DtoPopulator

Hibernate3DtoPopulator(Set<Class> entityBeanClassSet,
                       Set<CollectionPropertyName> collectionPropertyNameSet)

Hibernate3DtoPopulator

Hibernate3DtoPopulator(Set<CollectionPropertyName> collectionPropertyNameSet)

Hibernate3DtoPopulator

Hibernate3DtoPopulator()
Method Detail

init

Hibernate3DtoPopulator init(Hibernate3DtoCopier applicationBeanCopier)

shouldPopulate

public boolean shouldPopulate(String propertyName,
                              Method readerMethod)
Description copied from interface: BeanPopulatable
Returns true if the given JavaBean property should be populated; false otherwise.

Specified by:
shouldPopulate in interface BeanPopulatable
Parameters:
propertyName - property name.
readerMethod - reader method of the property.
Returns:
true if the property population should take place; false otherwise.
See Also:
BeanPopulatable.shouldPopulate(java.lang.String, java.lang.reflect.Method)

checkCollectionProperty

private boolean checkCollectionProperty(String propertyName,
                                        Method readerMethod)