net.sf.hibernate4gwt.core.beanlib.merge
Class MergeBeanPopulatable

java.lang.Object
  extended by net.sf.hibernate4gwt.core.beanlib.merge.MergeBeanPopulatable

public class MergeBeanPopulatable
extends java.lang.Object

Populatable for POJO with the lazy information of the Hibernate POJO This populatable is used to fill back an Hibernate POJO from a pure clone POJO (not implementing ILazyPojo). Only the not lazy properties of the Hibernate POJO are filled. To be correct, the clone and merge operations must be managed with the same Hibernate POJO, or a POJO with the same fetching strategy

Author:
bruno.marchesson

Constructor Summary
MergeBeanPopulatable(IPersistenceUtil persistenceUtil, IPojoStore pojoStore)
          Constructor
 
Method Summary
 IPersistenceUtil getPersistenceUtil()
           
 IPojoStore getPojoStore()
           
protected  boolean isLazyProperty(java.lang.Object cloneBean, java.lang.Object persistentValue, java.lang.String property)
          Indicates if the argument property is lazy or not
 void setPersistenceUtil(IPersistenceUtil util)
           
 void setPojoStore(IPojoStore store)
           
 boolean shouldPopulate(java.lang.String propertyName, java.lang.Object cloneBean, java.lang.reflect.Method readerMethod, java.lang.Object persistentBean, java.lang.reflect.Method setterMethod)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeBeanPopulatable

public MergeBeanPopulatable(IPersistenceUtil persistenceUtil,
                            IPojoStore pojoStore)
Constructor

Method Detail

getPersistenceUtil

public IPersistenceUtil getPersistenceUtil()
Returns:
the persistence Util implementation to use

setPersistenceUtil

public void setPersistenceUtil(IPersistenceUtil util)
Parameters:
util - the persistenceUtil to set

getPojoStore

public IPojoStore getPojoStore()
Returns:
the pojo store

setPojoStore

public void setPojoStore(IPojoStore store)
Parameters:
store - the pojo store to set

shouldPopulate

public boolean shouldPopulate(java.lang.String propertyName,
                              java.lang.Object cloneBean,
                              java.lang.reflect.Method readerMethod,
                              java.lang.Object persistentBean,
                              java.lang.reflect.Method setterMethod)

isLazyProperty

protected boolean isLazyProperty(java.lang.Object cloneBean,
                                 java.lang.Object persistentValue,
                                 java.lang.String property)
Indicates if the argument property is lazy or not

Parameters:
cloneBean -
persistentBean -
property -
readerMethod -
Returns: