org.granite.tide.seam.lazy
Class SeamHibernateInitializer

java.lang.Object
  extended by org.granite.tide.seam.lazy.SeamInitializer
      extended by org.granite.tide.seam.lazy.SeamHibernateInitializer
All Implemented Interfaces:
Serializable

@Name(value="org.granite.tide.seam.seamInitializer")
@Scope(value=CONVERSATION)
@Install(precedence=11,
         classDependencies="org.hibernate.Session")
@BypassInterceptors
public class SeamHibernateInitializer
extends SeamInitializer

Initializes a request for a passed in entity and a lazy property.

Author:
CIngram,VDanda
See Also:
Serialized Form

Constructor Summary
SeamHibernateInitializer()
           
 
Method Summary
protected  org.granite.tide.TidePersistenceManager tryToDetermineInitiailzer()
          Try to determine what type of persistence the application is using.
 
Methods inherited from class org.granite.tide.seam.lazy.SeamInitializer
findEntityManager, getTidePersistenceManager, instance, lazyInitialize, restoreLoadedEntities, saveLoadedEntities, setTidePersistenceManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeamHibernateInitializer

public SeamHibernateInitializer()
Method Detail

tryToDetermineInitiailzer

protected org.granite.tide.TidePersistenceManager tryToDetermineInitiailzer()
Try to determine what type of persistence the application is using. If the EntityManager is stored under entityManager or if the Hibernate session is stored under session. Then the context will be found and used. This is only called if a ITidePersistenceManager is not found, probably because the query was not run in a conversation.

Overrides:
tryToDetermineInitiailzer in class SeamInitializer
Returns:
The appropriate manager for the persistence context being used, if it can be determined otherwise a null is returned.