org.jboss.seam.persistence
Interface ManagedPersistenceContext


public interface ManagedPersistenceContext

Support for additional operations for all seam managed persistence contexts.

Author:
Gavin King, Stuart Douglas

Method Summary
 void changeFlushMode(FlushModeType flushMode)
          changes the flush mode of the persistence context.
 void closeAfterTransaction()
          Closes the persistence context after the current transaction has completed.
 Class<?> getBeanType()
          Returns the type of this persistence context.
 SeamPersistenceProvider getProvider()
          Returns the appropriate SeamPersistenceProvider implementation for this persistence context.
 Set<Annotation> getQualifiers()
           
 

Method Detail

changeFlushMode

void changeFlushMode(FlushModeType flushMode)
changes the flush mode of the persistence context. This allows changing the flush mode to @{link FlushModeType#MANUAL} provided the underlying SeamPersistenceProvider supports it.

Parameters:
flushMode - the new flush mode

getQualifiers

Set<Annotation> getQualifiers()
Returns:
the persistence contexts qualifiers

getBeanType

Class<?> getBeanType()
Returns the type of this persistence context. For JPA persistence contexts this will be javax.persistence.EntityManager. For pure hibernate PC's this will be org.hibernate.Session


getProvider

SeamPersistenceProvider getProvider()
Returns the appropriate SeamPersistenceProvider implementation for this persistence context.


closeAfterTransaction

void closeAfterTransaction()
Closes the persistence context after the current transaction has completed.

If no transaction is active the PC will be closed immediately



Copyright © 2011 Seam Framework. All Rights Reserved.