|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPersistenceUtil
Interface for all Facade over (JPA) persistence engines. It allows the library to work with Hibernate and (soon) OpenJPA and EclipseLink
Method Summary | |
---|---|
void |
closeCurrentSession()
Close the session opened with 'openSession' call |
java.lang.Object |
createEntityProxy(java.util.Map<java.lang.String,java.io.Serializable> proxyInformations)
Create an uninitialized proxy from the proxy informations |
java.lang.Object |
createPersistentCollection(java.util.Map<java.lang.String,java.io.Serializable> proxyInformations,
java.lang.Object underlyingCollection)
Create a persistent collection from serialized informations |
java.io.Serializable |
getId(java.lang.Object pojo)
|
java.io.Serializable |
getId(java.lang.Object pojo,
java.lang.Class<?> persistentClass)
|
java.lang.Class<?> |
getUnenhancedClass(java.lang.Class<?> clazz)
Get the persistent class without proxy |
void |
initialize(java.lang.Object proxy)
Initialize the argument if not |
boolean |
isEnhanced(java.lang.Class<?> clazz)
Indicated if the argument class is enhanced or not |
boolean |
isInitialized(java.lang.Object proxy)
Indicates it the argument is initialized not |
boolean |
isPersistentClass(java.lang.Class<?> clazz)
Indicates if the class is managed by the persistance container of not |
boolean |
isPersistentCollection(java.lang.Class<?> collectionClass)
Indicates if the argument collection is persistent or not |
boolean |
isPersistentPojo(java.lang.Object pojo)
Indicates if the pojo is persistent 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 |
java.util.Map<java.lang.String,java.io.Serializable> |
serializeEntityProxy(java.lang.Object proxy)
Serialize proxy informations of the argument entity into a map of properties |
java.util.Map<java.lang.String,java.io.Serializable> |
serializePersistentCollection(java.lang.Object persistentCollection)
Serialize a persistent collection |
Method Detail |
---|
void openSession()
void closeCurrentSession()
java.lang.Object load(java.io.Serializable id, java.lang.Class<?> persistentClass)
clonePojo
- the clone pojo (needed for ID)persistentClass
- the persistent class
java.io.Serializable getId(java.lang.Object pojo)
java.io.Serializable getId(java.lang.Object pojo, java.lang.Class<?> persistentClass)
boolean isPersistentPojo(java.lang.Object pojo)
boolean isPersistentClass(java.lang.Class<?> clazz)
java.lang.Class<?> getUnenhancedClass(java.lang.Class<?> clazz)
boolean isEnhanced(java.lang.Class<?> clazz)
clazz
- the persistent class
boolean isPersistentCollection(java.lang.Class<?> collectionClass)
collectionClass
- the collection class
boolean isInitialized(java.lang.Object proxy)
proxy
- the instance to check
void initialize(java.lang.Object proxy)
proxy
- the instance to initializejava.util.Map<java.lang.String,java.io.Serializable> serializeEntityProxy(java.lang.Object proxy)
proxy
- the proxy to serialize
java.lang.Object createEntityProxy(java.util.Map<java.lang.String,java.io.Serializable> proxyInformations)
proxyInformations
- the serialized proxy informations
java.util.Map<java.lang.String,java.io.Serializable> serializePersistentCollection(java.lang.Object persistentCollection)
persistentCollection
- the persistent collection
java.lang.Object createPersistentCollection(java.util.Map<java.lang.String,java.io.Serializable> proxyInformations, java.lang.Object underlyingCollection)
serialized
- form of the persistent collection informationsunderlyingCollection
- the filled underlying collection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |