org.apache.cayenne.configuration.web
Class WebUtil

java.lang.Object
  extended by org.apache.cayenne.configuration.web.WebUtil

public class WebUtil
extends java.lang.Object

A helper class to retrieve and store CayenneRuntime in the ServletContext. All Cayenne web configuration objects, such as CayenneFilter and ROPHessianServlet, are using this class to access runtime.

Since:
3.1

Constructor Summary
WebUtil()
           
 
Method Summary
static CayenneRuntime getCayenneRuntime(javax.servlet.ServletContext context)
          Retrieves CayenneRuntime previously stored in provided context via setCayenneRuntime(ServletContext, CayenneRuntime).
static void setCayenneRuntime(javax.servlet.ServletContext context, CayenneRuntime runtime)
          Stores CayenneRuntime in the servlet context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebUtil

public WebUtil()
Method Detail

getCayenneRuntime

public static CayenneRuntime getCayenneRuntime(javax.servlet.ServletContext context)
Retrieves CayenneRuntime previously stored in provided context via setCayenneRuntime(ServletContext, CayenneRuntime). May return null if no runtime was stored.


setCayenneRuntime

public static void setCayenneRuntime(javax.servlet.ServletContext context,
                                     CayenneRuntime runtime)
Stores CayenneRuntime in the servlet context. It can be later retrieve via getCayenneRuntime(ServletContext).



Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.