Package grails.persistence.support
Class NullPersistentContextInterceptor
java.lang.Object
grails.persistence.support.NullPersistentContextInterceptor
- All Implemented Interfaces:
PersistenceContextInterceptor
public class NullPersistentContextInterceptor
extends Object
implements PersistenceContextInterceptor
A dummy persistence context interceptor that does nothing.
- Since:
- 1.1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear any pending changes.voiddestroy()Called to finalize the persistent context.voidDisconnects 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.voidReconnects the persistence context.voidSets the persistence context to read-only mode.voidSets the persistence context to read-write mode.
-
Constructor Details
-
NullPersistentContextInterceptor
public NullPersistentContextInterceptor()
-
-
Method Details
-
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
-