net.sf.hibernate4gwt.core.beanlib.merge
Class MergeBeanPopulatable
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MergeBeanPopulatable
public MergeBeanPopulatable(IPersistenceUtil persistenceUtil,
IPojoStore pojoStore)
- Constructor
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: