org.grails.datastore.mapping.web.support
Class OpenSessionInViewInterceptor

java.lang.Object
  extended by org.grails.datastore.mapping.web.support.OpenSessionInViewInterceptor
All Implemented Interfaces:
org.springframework.web.context.request.WebRequestInterceptor

public class OpenSessionInViewInterceptor
extends java.lang.Object
implements org.springframework.web.context.request.WebRequestInterceptor

A WebRequestInterceptor instance that handles opening a Datastore session within the scope of a request


Constructor Summary
OpenSessionInViewInterceptor()
           
 
Method Summary
 void afterCompletion(org.springframework.web.context.request.WebRequest webRequest, java.lang.Exception e)
           
 org.grails.datastore.mapping.core.Datastore getDatastore()
           
protected  boolean hasSessionBound()
           
 void postHandle(org.springframework.web.context.request.WebRequest webRequest, org.springframework.ui.ModelMap modelMap)
           
 void preHandle(org.springframework.web.context.request.WebRequest webRequest)
           
 void setDatastore(org.grails.datastore.mapping.core.Datastore datastore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenSessionInViewInterceptor

public OpenSessionInViewInterceptor()
Method Detail

setDatastore

public void setDatastore(org.grails.datastore.mapping.core.Datastore datastore)

getDatastore

public org.grails.datastore.mapping.core.Datastore getDatastore()

preHandle

public void preHandle(org.springframework.web.context.request.WebRequest webRequest)
               throws java.lang.Exception
Specified by:
preHandle in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
java.lang.Exception

postHandle

public void postHandle(org.springframework.web.context.request.WebRequest webRequest,
                       org.springframework.ui.ModelMap modelMap)
                throws java.lang.Exception
Specified by:
postHandle in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
java.lang.Exception

hasSessionBound

protected boolean hasSessionBound()

afterCompletion

public void afterCompletion(org.springframework.web.context.request.WebRequest webRequest,
                            java.lang.Exception e)
                     throws java.lang.Exception
Specified by:
afterCompletion in interface org.springframework.web.context.request.WebRequestInterceptor
Throws:
java.lang.Exception