PageRenderTime 16ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/demos/helloorm/src/com/google/appengine/demos/helloorm/UpdatePersistenceStandard.java

http://datanucleus-appengine.googlecode.com/
Java | 21 lines | 13 code | 4 blank | 4 comment | 0 complexity | 8b4841f5bbe666e6d97889b09709aaf1 MD5 | raw file
 1// Copyright 2008 Google Inc. All Rights Reserved.
 2package com.google.appengine.demos.helloorm;
 3
 4import java.io.IOException;
 5
 6import javax.servlet.http.HttpServlet;
 7import javax.servlet.http.HttpServletRequest;
 8import javax.servlet.http.HttpServletResponse;
 9
10/**
11 * @author Max Ross <maxr@google.com>
12 */
13public class UpdatePersistenceStandard extends HttpServlet {
14
15  @Override
16  public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
17    PersistenceStandard ps = PersistenceStandard.valueOf(req.getParameter("persistenceStandard"));
18    PersistenceStandard.set(ps);
19    resp.sendRedirect("/");
20  }
21}