net.sf.hibernate4gwt.core
Interface IPersistenceUtil

All Known Implementing Classes:
HibernateUtil

public interface IPersistenceUtil


Method Summary
 void closeCurrentSession()
          Open a new session
 java.io.Serializable getId(java.lang.Object pojo)
           
 java.io.Serializable getId(java.lang.Object pojo, java.lang.Class<?> persistentClass)
           
 java.lang.Class<?> getPersistentClass(java.lang.Class<?> clazz)
           
 void initializeProxy(java.lang.Object proxy)
          Initialize the argument proxy
 boolean isEnhanced(java.lang.Class<?> clazz)
          Indicated if the argument class is enhanced or not
 boolean isPersistentClass(java.lang.Class<?> clazz)
          Indicates if the class is managed by the persistence container of not
 boolean isPersistentCollection(java.lang.Class<?> clazz)
          Indicates if the collection class is managed by the persistence container of not
 boolean isPersistentPojo(java.lang.Object pojo)
          Indicates if the pojo is persistent or not
 boolean isProxy(java.lang.Object proxy)
          Indicates it the argument is a proxy or not
 java.lang.Object load(java.io.Serializable id, java.lang.Class<?> persistentClass)
          Load a fresh instance of the persistent Pojo
 void openSession()
          Open a new session
 

Method Detail

getId

java.io.Serializable getId(java.lang.Object pojo)
Returns:
the ID of the argument Hibernate Pojo

getId

java.io.Serializable getId(java.lang.Object pojo,
                           java.lang.Class<?> persistentClass)
Returns:
the ID of the argument DTO with the same name than the persistent class

isPersistentPojo

boolean isPersistentPojo(java.lang.Object pojo)
Indicates if the pojo is persistent or not


isPersistentClass

boolean isPersistentClass(java.lang.Class<?> clazz)
Indicates if the class is managed by the persistence container of not


isPersistentCollection

boolean isPersistentCollection(java.lang.Class<?> clazz)
Indicates if the collection class is managed by the persistence container of not


getPersistentClass

java.lang.Class<?> getPersistentClass(java.lang.Class<?> clazz)
Returns:
the underlying persistent class

isEnhanced

boolean isEnhanced(java.lang.Class<?> clazz)
Indicated if the argument class is enhanced or not

Parameters:
clazz - the persistent class
Returns:
true is the class is enhanced, false otherwise

openSession

void openSession()
Open a new session


closeCurrentSession

void closeCurrentSession()
Open a new session


load

java.lang.Object load(java.io.Serializable id,
                      java.lang.Class<?> persistentClass)
Load a fresh instance of the persistent Pojo

Parameters:
clonePojo - the clone pojo (needed for ID)
persistentClass - the persistent class
Returns:
the loaded instance

isProxy

boolean isProxy(java.lang.Object proxy)
Indicates it the argument is a proxy or not

Parameters:
proxy -
Returns:

initializeProxy

void initializeProxy(java.lang.Object proxy)
Initialize the argument proxy

Parameters:
proxy -