Package grails.persistence.support
Class NullPersistentContextInterceptor
- java.lang.Object
-
- grails.persistence.support.NullPersistentContextInterceptor
-
- All Implemented Interfaces:
PersistenceContextInterceptor
public class NullPersistentContextInterceptor extends java.lang.Object implements PersistenceContextInterceptor
A dummy persistence context interceptor that does nothing.- Since:
- 1.1.1
-
-
Constructor Summary
Constructors Constructor Description NullPersistentContextInterceptor()
-
Method Summary
All Methods Instance Methods Concrete 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
public void init()
Description copied from interface:PersistenceContextInterceptorCalled to intialisation the persistent context.- Specified by:
initin interfacePersistenceContextInterceptor
-
destroy
public void destroy()
Description copied from interface:PersistenceContextInterceptorCalled to finalize the persistent context.- Specified by:
destroyin interfacePersistenceContextInterceptor
-
disconnect
public void disconnect()
Description copied from interface:PersistenceContextInterceptorDisconnects the persistence context.- Specified by:
disconnectin interfacePersistenceContextInterceptor
-
reconnect
public void reconnect()
Description copied from interface:PersistenceContextInterceptorReconnects the persistence context.- Specified by:
reconnectin interfacePersistenceContextInterceptor
-
flush
public void flush()
Description copied from interface:PersistenceContextInterceptorFlushes any pending changes to the DB.- Specified by:
flushin interfacePersistenceContextInterceptor
-
clear
public void clear()
Description copied from interface:PersistenceContextInterceptorClear any pending changes.- Specified by:
clearin interfacePersistenceContextInterceptor
-
setReadOnly
public void setReadOnly()
Description copied from interface:PersistenceContextInterceptorSets the persistence context to read-only mode.- Specified by:
setReadOnlyin interfacePersistenceContextInterceptor
-
setReadWrite
public void setReadWrite()
Description copied from interface:PersistenceContextInterceptorSets the persistence context to read-write mode.- Specified by:
setReadWritein interfacePersistenceContextInterceptor
-
isOpen
public boolean isOpen()
Description copied from interface:PersistenceContextInterceptorChecks whether the persistence context is open.- Specified by:
isOpenin interfacePersistenceContextInterceptor- Returns:
- Returns whether the persistence context is open
-
-