Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.support
Interface PersistenceContextInterceptor

All Known Implementing Classes:
  HibernatePersistenceContextInterceptor, NullPersistentContextInterceptor

    public interface PersistenceContextInterceptor

A interface for a class to implement that will setup the persistent context before and after a Grails operation is invoked. @see grails.util.RunTests

Since:
  0.4
Author:
  Graeme Rocher

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

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD