net.sf.beanlib.hibernate
Class HibernateBeanPopulatableSupport

java.lang.Object
  extended by net.sf.beanlib.hibernate.HibernateBeanPopulatableSupport
All Implemented Interfaces:
BeanPopulatable

public class HibernateBeanPopulatableSupport
extends Object
implements BeanPopulatable

The default implemenation to determine if a Hibernate JavaBean property should be populated. Each population decision can be vetoed by plugging in a custom vetoer.

Author:
Joe D. Velopar

Field Summary
private  Set<? extends CollectionPropertyName> collectionPropertyNameSet
           
private  Set<Class> entityBeanClassSet
           
private  BeanPopulatable vetoer
           
 
Constructor Summary
HibernateBeanPopulatableSupport(Set<Class> entityBeanClassSet, Set<? extends CollectionPropertyName> collectionPropertyNameSet, BeanPopulatable vetoer)
           
 
Method Summary
 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 Set<Class> entityBeanClassSet

collectionPropertyNameSet

private Set<? extends CollectionPropertyName> collectionPropertyNameSet

vetoer

private BeanPopulatable vetoer
Constructor Detail

HibernateBeanPopulatableSupport

public HibernateBeanPopulatableSupport(Set<Class> entityBeanClassSet,
                                       Set<? extends CollectionPropertyName> collectionPropertyNameSet,
                                       BeanPopulatable vetoer)
Method Detail

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(String, Method)