Groovy Documentation

org.codehaus.groovy.grails.support
[Java] Interface PersistenceContextInterceptor


public interface PersistenceContextInterceptor

Sets up the persistent context before and after a Grails operation is invoked.

Authors:
Graeme Rocher
Since:
0.4


Method Summary
void clear()

Clear any pending changes.

void destroy()

Called to finalize the persistent context.

void disconnect()

Disconnects the persistence context.

void flush()

Flushes any pending changes to the DB.

void init()

Called to intialisation the persistent context.

boolean isOpen()

Checks whether the persistence context is open.

void reconnect()

Reconnects the persistence context.

void setReadOnly()

Sets the persistence context to read-only mode.

void setReadWrite()

Sets the persistence context to read-write mode.

 

Method Detail

clear

public void clear()
Clear any pending changes.


destroy

public void destroy()
Called to finalize the persistent context.


disconnect

public void disconnect()
Disconnects the persistence context.


flush

public void flush()
Flushes any pending changes to the DB.


init

public void init()
Called to intialisation the persistent context.


isOpen

public boolean isOpen()
Checks whether the persistence context is open.
Returns:
Returns whether the persistence context is open


reconnect

public void reconnect()
Reconnects the persistence context.


setReadOnly

public void setReadOnly()
Sets the persistence context to read-only mode.


setReadWrite

public void setReadWrite()
Sets the persistence context to read-write mode.


 

Groovy Documentation