## org.codehaus.groovy.grails.orm.hibernate.support
Class HibernatePersistenceContextInterceptor

    java.lang.Object
      org.codehaus.groovy.grails.orm.hibernate.support.HibernatePersistenceContextInterceptor

All Implemented Interfaces:
  PersistenceContextInterceptor

    public class HibernatePersistenceContextInterceptor

extends Object
implements PersistenceContextInterceptor

Since:
  0.4
Author:
  Graeme Rocher

Constructor Summary
`HibernatePersistenceContextInterceptor()`

Method Summary
`void` `clear()` Clear any pending changes
`void` `destroy()` Called to finalize the persistent context
`void` `flush()` Flushes any pending changes to the DB
`org.hibernate.SessionFactory` `getSessionFactory()`
`void` `init()` Called to intialisation the persistent context
`void` `setSessionFactory(org.hibernate.SessionFactory sessionFactory)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HibernatePersistenceContextInterceptor

    public HibernatePersistenceContextInterceptor()

Method Detail

### destroy

    public void destroy()

  Description copied from interface: `PersistenceContextInterceptor`
  Called to finalize the persistent context

  Specified by:
    `destroy` in interface `PersistenceContextInterceptor`

### flush

    public void flush()

  Description copied from interface: `PersistenceContextInterceptor`
  Flushes any pending changes to the DB

  Specified by:
    `flush` in interface `PersistenceContextInterceptor`

### clear

    public void clear()

  Description copied from interface: `PersistenceContextInterceptor`
  Clear any pending changes

  Specified by:
    `clear` in interface `PersistenceContextInterceptor`

### init

    public void init()

  Description copied from interface: `PersistenceContextInterceptor`
  Called to intialisation the persistent context

  Specified by:
    `init` in interface `PersistenceContextInterceptor`

### getSessionFactory

    public org.hibernate.SessionFactory getSessionFactory()

  Returns:
    the sessionFactory

### setSessionFactory

    public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)

  Parameters:
    `sessionFactory` - the sessionFactory to set

Copyright (c) 2005-2009 The Grails project