Logo of Bento frameworkspaceObject Oriented Programming


Source code example of RequestStore : SELECT


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

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

   // Let's pick up the persisted request
   // whose "req_id" is 123456L.
   Map values=new HashMap();
   values.put("req_id",new Long("123456L"));

   // Retrieve the request parameters from SQL table.
   // The first parameter is the ID for the SQL statement,
   // that is defined in the configuration XML.
   // The second one is ParsedRequestParameters object,
   // that may include the parameters values for
   // WHERE clause in the SQL statement.
   // The last one is Map object, whose value may be
   // used in WHERE clause in the SQL statement.
   // In this example, the Map object includes the value
   // for "req_id".
   StoredRequestParameters
      stored=reqStore.selectUnique("select01",
                                   params,
                                   values);


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