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.orm.hibernate.support
Class GrailsOpenSessionInViewInterceptor

    java.lang.Object
      org.springframework.orm.hibernate3.HibernateAccessor
          org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor
              org.codehaus.groovy.grails.orm.hibernate.support.GrailsOpenSessionInViewInterceptor

All Implemented Interfaces:
  BeanFactoryAware, InitializingBean, WebRequestInterceptor

    public class GrailsOpenSessionInViewInterceptor

extends OpenSessionInViewInterceptor

An interceptor that extends the default spring OSIVI and doesn't flush the session if it has been set to MANUAL on the session itself

Since:
  0.5

  Created: Feb 2, 2007 Time: 12:24:11 AM
Author:
  Graeme Rocher

Field Summary

Fields inherited from class org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor
`PARTICIPATE_SUFFIX`

Fields inherited from class org.springframework.orm.hibernate3.HibernateAccessor
`FLUSH_ALWAYS, FLUSH_AUTO, FLUSH_COMMIT, FLUSH_EAGER, FLUSH_NEVER, logger`

Constructor Summary
`GrailsOpenSessionInViewInterceptor()`

Method Summary
`void` | `afterCompletion(WebRequest request, Exception ex)`
`protected void` | `flushIfNecessary(org.hibernate.Session session, boolean existingTransaction)`
`void` | `postHandle(WebRequest request, ModelMap model)`
`void` | `preHandle(WebRequest request)`

Methods inherited from class org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor
`getParticipateAttributeName, isSingleSession, setSingleSession`

Methods inherited from class org.springframework.orm.hibernate3.HibernateAccessor
`afterPropertiesSet, applyFlushMode, convertHibernateAccessException, convertJdbcAccessException, convertJdbcAccessException, disableFilters, enableFilters, getDefaultJdbcExceptionTranslator, getEntityInterceptor, getFilterNames, getFlushMode, getJdbcExceptionTranslator, getSessionFactory, setBeanFactory, setEntityInterceptor, setEntityInterceptorBeanName, setFilterName, setFilterNames, setFlushMode, setFlushModeName, setJdbcExceptionTranslator, setSessionFactory`

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

Constructor Detail

### GrailsOpenSessionInViewInterceptor

    public GrailsOpenSessionInViewInterceptor()

Method Detail

### preHandle

    public void preHandle(WebRequest request)
                   throws DataAccessException

  Specified by:
    `preHandle` in interface `WebRequestInterceptor`
  Overrides:
    `preHandle` in class `OpenSessionInViewInterceptor`
  Throws:
    `DataAccessException`

### postHandle

    public void postHandle(WebRequest request,
                           ModelMap model)
                    throws DataAccessException

  Specified by:
    `postHandle` in interface `WebRequestInterceptor`
  Overrides:
    `postHandle` in class `OpenSessionInViewInterceptor`
  Throws:
    `DataAccessException`

### afterCompletion

    public void afterCompletion(WebRequest request,
                                Exception ex)
                         throws DataAccessException

  Specified by:
    `afterCompletion` in interface `WebRequestInterceptor`
  Overrides:
    `afterCompletion` in class `OpenSessionInViewInterceptor`
  Throws:
    `DataAccessException`

### flushIfNecessary

    protected void flushIfNecessary(org.hibernate.Session session,
                                    boolean existingTransaction)
                             throws org.hibernate.HibernateException

  Overrides:
    `flushIfNecessary` in class `HibernateAccessor`
  Throws:
    `org.hibernate.HibernateException`

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

Copyright (c) 2005-2009 The Grails project