KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > smile > stored > s_deleteGroup


1 package smile.stored;
2
3 import java.util.*;
4 import java.sql.*;
5
6 /**
7  * s_deleteGroup is an implements the ProcedureInterface and is a sub-class of
8  * StoredProcedure. This class deletes security groups from the database.
9  *
10  * Copyright 2002 Smile Les motoristes Internet http://www.smile.fr/ Contact
11  * cofax@smile.fr for further information
12  *
13  * @author Smile Les motoristes Internet
14  *
15  */

16 public class s_deleteGroup extends StoredProcedure implements ProcedureInterface {
17
18     // proprietes propres a cette stored proc
19
String JavaDoc in_groupID;
20
21     public s_deleteGroup() {
22     }
23
24     public void init(HashMap initData, Connection con) {
25         // on initialise le hashmap de donnees et la connection de l'objet
26
super.init(initData, con);
27         // on initialise les propprietes de l'objet
28
in_groupID = utils.getString(data, "GROUPID", "");
29     }
30
31     public void checkAction() throws SQLException {
32     }
33
34     public void checkParams() throws SQLException {
35     }
36
37     public void executeAction() throws SQLException {
38         StringBuffer JavaDoc v_sb = new StringBuffer JavaDoc();
39         v_sb.append("DELETE FROM tblpermgroups ").append(" WHERE groupID = " + in_groupID);
40
41         execStatement(v_sb.toString());
42
43         execStatementToRS(queryResultOk);
44     }
45 }
Popular Tags