|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate4gwt.core.HibernateBeanManager
public class HibernateBeanManager
Manager for Hibernate POJO handling
Field Summary | |
---|---|
protected IClassMapper |
_classMapper
The Class mapper |
protected LazyKiller |
_lazyKiller
The POJO lazy killer |
protected IPersistenceUtil |
_persistenceUtil
The associated persistence util implementation |
protected IPojoStore |
_pojoStore
The associated POJO Handler |
Constructor Summary | |
---|---|
HibernateBeanManager()
Empty Constructor |
Method Summary | |
---|---|
java.lang.Object |
clone(java.lang.Object object)
Clone and store the Hibernate POJO(s) |
java.lang.Object |
clone(java.lang.Object object,
boolean assignable)
Clone and store the Hibernate POJO |
protected java.util.Collection |
cloneCollection(java.util.Collection hibernatePojoList,
boolean assignable)
Clone and store a collection of Hibernate POJO |
protected java.util.Map |
cloneMap(java.util.Map hibernatePojoMap,
boolean assignable)
Clone and store a map of Hibernate POJO |
protected java.lang.Object |
clonePojo(java.lang.Object pojo,
boolean assignable)
Clone and store the Hibernate POJO |
protected java.util.Collection<java.lang.Object> |
createNewCollection(java.util.Collection<?> pojoCollection)
Create a new collection with the same behavior than the argument one |
protected java.util.Map |
createNewMap(java.util.Map pojoMap)
Create a new map with the same behavior than the argument one |
IClassMapper |
getClassMapper()
|
static HibernateBeanManager |
getInstance()
|
IPersistenceUtil |
getPersistenceUtil()
|
IPojoStore |
getPojoStore()
|
protected boolean |
holdPersistentObject(java.lang.Object pojo)
In deep persistent association checking. |
java.lang.Object |
merge(java.lang.Object object)
Merge the clone POJO to its Hibernate counterpart |
java.lang.Object |
merge(java.lang.Object object,
boolean assignable)
Merge the clone POJO to its Hibernate counterpart |
protected java.util.Collection |
mergeCollection(java.util.Collection clonePojoList,
boolean assignable)
Retrieve the Hibernate Pojo List and merge the modification from GWT |
protected java.util.Map |
mergeMap(java.util.Map cloneMap,
boolean assignable)
Fill copy map with Hibernate merged POJO |
protected java.lang.Object |
mergePojo(java.lang.Object clonePojo,
boolean assignable)
Retrieve the Hibernate Pojo and merge the modification from GWT |
void |
remove(java.lang.Object object)
Remove the object of the pojo store |
protected void |
removeCollection(java.util.Collection pojoList)
Remove the collection of pojo from the pojo store |
protected void |
removeMap(java.util.Map pojoMap)
Remove the content of the map of pojo from the pojo store |
protected void |
removePojo(java.lang.Object pojo)
Remove the pojo from the pojo store |
void |
setClassMapper(IClassMapper mapper)
|
void |
setEntityManagerFactory(java.lang.Object entityManagerFactory)
Helper setter to initialize HibernateHelper with the embedded Hibernate SessionFactory. |
void |
setPersistenceUtil(IPersistenceUtil util)
|
void |
setPojoStore(IPojoStore pojoStore)
set the used pojo store |
void |
setSessionFactory(SessionFactory sessionFactory)
Helper setter to initialize HibernateHelper Must be called on startup ! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IPojoStore _pojoStore
protected IClassMapper _classMapper
protected LazyKiller _lazyKiller
protected IPersistenceUtil _persistenceUtil
Constructor Detail |
---|
public HibernateBeanManager()
Method Detail |
---|
public static HibernateBeanManager getInstance()
public IPojoStore getPojoStore()
public void setPojoStore(IPojoStore pojoStore)
public IClassMapper getClassMapper()
public void setClassMapper(IClassMapper mapper)
mapper
- the class Mapper to setpublic void setSessionFactory(SessionFactory sessionFactory)
public void setEntityManagerFactory(java.lang.Object entityManagerFactory)
public IPersistenceUtil getPersistenceUtil()
public void setPersistenceUtil(IPersistenceUtil util)
util
- the _persistenceUtil to setpublic java.lang.Object clone(java.lang.Object object)
public java.lang.Object clone(java.lang.Object object, boolean assignable)
object
- the object to storeassignable
- if the assignation from source to target class (via ClassMapper) must be checked
public java.lang.Object merge(java.lang.Object object)
public java.lang.Object merge(java.lang.Object object, boolean assignable)
public void remove(java.lang.Object object)
protected java.lang.Object clonePojo(java.lang.Object pojo, boolean assignable)
pojo
- the pojo to storeassignable
- does the source and target class must be assignable?
NotAssignableException
- if source and target class are not assignableprotected java.util.Map cloneMap(java.util.Map hibernatePojoMap, boolean assignable)
protected java.util.Collection cloneCollection(java.util.Collection hibernatePojoList, boolean assignable)
protected java.lang.Object mergePojo(java.lang.Object clonePojo, boolean assignable)
clonePojo
- the clone pojoassignable
- does the source and target class must be assignable
java.lang.UnsupportedOperationException
- if the clone POJO does not
implements ILazyPojo and the POJO store is stateless
NotAssignableException
- if source and target class are not assignableprotected java.util.Collection mergeCollection(java.util.Collection clonePojoList, boolean assignable)
clonePojoList
- the clone pojo list
java.lang.UnsupportedOperationException
- if a POJO from the list does
not implements ILazyPojo and the POJO store is statelessprotected java.util.Map mergeMap(java.util.Map cloneMap, boolean assignable)
cloneMap
-
protected void removePojo(java.lang.Object pojo)
pojo
- hibernate pojoprotected void removeMap(java.util.Map pojoMap)
pojoList
- hibernate pojo listprotected void removeCollection(java.util.Collection pojoList)
pojoList
- hibernate pojo collectionprotected java.util.Collection<java.lang.Object> createNewCollection(java.util.Collection<?> pojoCollection)
pojoCollection
- the source collection
protected java.util.Map createNewMap(java.util.Map pojoMap)
pojoMap
- the source map
protected boolean holdPersistentObject(java.lang.Object pojo)
pojo
- the wrapping pojo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |