Logo of Bento frameworkspaceObject Oriented Programming


Source code example of RequestStore : INSERT


   // Get the instance of RequestStore.
   RequestStore
      reqStore=RequestStore.getInstance();

   // Create ParsedRequestParameters object.
   ParsedRequestParameters
      params=reqParser.parseSimple(req);

   // Create Map object, and put the value
   // into it.
   Map value=new HashMap();
   value.put("amount",new Integer(1500));

   // Store the parameters into the SQL table.
   // SQL statement is specified
   // by the first parameter.
   // It is the ID for the SQL statement in
   // the configuration XML.
   // The second parameter is
   // ParsedRequestParameters object, some
   // of its request parameters will be saved
   // into SQL table.
   // In addition, the values in Map object can
   // also be inserted into SQL table.
   long id=reqStore.insert("insert01", params, value);

   // Please save the above ID into another SQL table,
   // that is specific to your web application.
   // For example, the ID can be saved along with the
   // subject of the posted message.
   ...


Copyright © 1997-2007 OOP-Research CorporationTM, All Rights Reserved.