Package: grails.persistence.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

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `clear()` Clear any pending changes.
    `` | `public void` | `destroy()` Called to finalize the persistent context.
    `` | `public void` | `disconnect()` Disconnects the persistence context.
    `` | `public void` | `flush()` Flushes any pending changes to the DB.
    `` | `public void` | `init()` Called to intialisation the persistent context.
    `` | `public boolean` | `isOpen()` Checks whether the persistence context is open.
    `` | `public void` | `reconnect()` Reconnects the persistence context.
    `` | `public void` | `setReadOnly()` Sets the persistence context to read-only mode.
    `` | `public void` | `setReadWrite()` Sets the persistence context to read-write mode.

- - ### Method Detail

    - #### public void clear()

      Clear any pending changes.

    - #### public void destroy()

      Called to finalize the persistent context.

    - #### public void disconnect()

      Disconnects the persistence context.

    - #### public void flush()

      Flushes any pending changes to the DB.

    - #### public void init()

      Called to intialisation the persistent context.

    - #### public boolean isOpen()

      Checks whether the persistence context is open.

      Returns:
        Returns whether the persistence context is open

    - #### public void reconnect()

      Reconnects the persistence context.

    - #### public void setReadOnly()

      Sets the persistence context to read-only mode.

    - #### public void setReadWrite()

      Sets the persistence context to read-write mode.