KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > smile > stored > s_updateSavedSearches


1 package smile.stored;
2
3 import java.util.*;
4 import java.sql.*;
5
6 /**
7  * s_updateSavedSearches is an implements the ProcedureInterface and is a
8  * sub-class of StoredProcedure. Copyright 2002 Smile Les motoristes Internet
9  * http://www.smile.fr/ Contact cofax@smile.fr for further information
10  *
11  * @author Smile Les motoristes Internet
12  * @created March 22, 2002
13  */

14 public class s_updateSavedSearches extends StoredProcedure implements ProcedureInterface {
15
16     // proprietes propres a cette stored proc
17
String JavaDoc in_userid;
18
19     String JavaDoc in_search;
20
21     String JavaDoc in_searchName;
22
23     /**
24      * Constructor for the s_updateSavedSearches object
25      */

26     public s_updateSavedSearches() {
27     }
28
29     /**
30      * Description of the Method
31      *
32      * @param initData
33      * Description of the Parameter
34      * @param con
35      * Description of the Parameter
36      */

37     public void init(HashMap initData, Connection con) {
38         // on initialise le hashmap de donnees et la connection de l'objet
39
super.init(initData, con);
40         // on initialise les propprietes de l'objet
41
in_userid = utils.getString(data, "USERID", "");
42         in_search = utils.getString(data, "SEARCH", "");
43         in_searchName = utils.getString(data, "SEARCHNAME", "");
44     }
45
46     /**
47      * Description of the Method
48      *
49      * @exception SQLException
50      * Description of the Exception
51      */

52     public void checkParams() throws SQLException {
53     }
54
55     /**
56      * Description of the Method
57      *
58      * @exception SQLException
59      * Description of the Exception
60      */

61     public void checkAction() throws SQLException {
62     }
63
64     /**
65      * Description of the Method
66      *
67      * @exception SQLException
68      * Description of the Exception
69      */

70     public void executeAction() throws SQLException {
71         StringBuffer JavaDoc v_sb = new StringBuffer JavaDoc();
72         v_sb.append("INSERT INTO tblpermsavedsearches ").append("(userid, search, searchname) ").append(
73                 "VALUES ( '" + in_userid + "', '" + in_search + "', '" + in_searchName + "')");
74         execStatement(v_sb.toString());
75
76         execStatementToRS(queryResultOk);
77     }
78 }
79
Popular Tags