Package grails.persistence.support
Interface PersistenceContextInterceptor
-
- All Known Implementing Classes:
NullPersistentContextInterceptor
public interface PersistenceContextInterceptorSets up the persistent context before and after a Grails operation is invoked.- Since:
- 0.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clear any pending changes.voiddestroy()Called to finalize the persistent context.voiddisconnect()Disconnects the persistence context.voidflush()Flushes any pending changes to the DB.voidinit()Called to intialisation the persistent context.booleanisOpen()Checks whether the persistence context is open.voidreconnect()Reconnects the persistence context.voidsetReadOnly()Sets the persistence context to read-only mode.voidsetReadWrite()Sets the persistence context to read-write mode.
-
-
-
Method Detail
-
init
void init()
Called to intialisation the persistent context.
-
destroy
void destroy()
Called to finalize the persistent context.
-
disconnect
void disconnect()
Disconnects the persistence context.
-
reconnect
void reconnect()
Reconnects the persistence context.
-
flush
void flush()
Flushes any pending changes to the DB.
-
clear
void clear()
Clear any pending changes.
-
setReadOnly
void setReadOnly()
Sets the persistence context to read-only mode.
-
setReadWrite
void setReadWrite()
Sets the persistence context to read-write mode.
-
isOpen
boolean isOpen()
Checks whether the persistence context is open.- Returns:
- Returns whether the persistence context is open
-
-