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.apache.cayenne.configuration.web
Class WebUtil

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

    public class WebUtil

extends 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)`.

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 © 2001-2011 Apache Cayenne. All Rights Reserved.