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

java.lang.Object
  extended by net.sf.gilead.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 proxy information. 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, IProxyStore proxyStore)
          Constructor
 
Method Summary
 IPersistenceUtil getPersistenceUtil()
           
 IProxyStore getProxyStore()
           
protected  boolean isInitialized(java.util.Map<java.lang.String,java.io.Serializable> proxyInfo)
          Indicates if the argument property is lazy or not
 void setPersistenceUtil(IPersistenceUtil util)
           
 void setProxyStore(IProxyStore 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,
                            IProxyStore proxyStore)
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

getProxyStore

public IProxyStore getProxyStore()
Returns:
the proxy store

setProxyStore

public void setProxyStore(IProxyStore store)
Parameters:
store - the proxy 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)

isInitialized

protected boolean isInitialized(java.util.Map<java.lang.String,java.io.Serializable> proxyInfo)
Indicates if the argument property is lazy or not

Parameters:
proxyInfo - serialized proxy informations
Returns: