KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nilostep > xlsql > sql > xlSqlUpdate


1 /*(Header: NiLOSTEP / xlSQL)
2
3     Copyright (C) 2004 NiLOSTEP Information Sciences, all
4     rights reserved.
5     
6     This program is licensed under the terms of the GNU
7     General Public License.You should have received a copy
8     of the GNU General Public License along with this
9     program;
10 */

11
12 package com.nilostep.xlsql.sql;
13
14 import com.nilostep.xlsql.database.xlDatabase;
15 import com.nilostep.xlsql.database.*;
16
17 import java.sql.*;
18
19 /**
20  * DOCUMENT ME!
21  *
22  * @author Jim Caprioli
23  */

24 public class xlSqlUpdate implements xlSqlCommand {
25     //~ Instance variables ·····················································
26

27     protected com.nilostep.xlsql.database.xlDatabase db;
28     protected String JavaDoc _schema;
29     protected String JavaDoc _table;
30
31     /**
32      * Creates a new instance of type xlSqlUpdate.
33      *
34      *
35      * @param database
36      * @param schema
37      * @param table
38      */

39     public xlSqlUpdate(com.nilostep.xlsql.database.xlDatabase database, String JavaDoc schema, String JavaDoc table) {
40         if (database == null) {
41             throw new NullPointerException JavaDoc("xlSQL: database null");
42         } else {
43             db = database;
44         }
45
46         if (schema == null) {
47             throw new NullPointerException JavaDoc("xlSQL: schema null");
48         } else {
49             _schema = schema;
50         }
51
52         if (table == null) {
53             throw new NullPointerException JavaDoc("xlSQL: table null");
54         } else {
55             _table = table;
56         }
57     }
58
59     /**
60      * TODO: javadoc
61      *
62      * @return true if allowed
63      *
64      * @throws SQLException
65      */

66     public boolean execAllowed() throws SQLException {
67         boolean ret = true;
68         return ret;
69     }
70
71     /**
72      * TODO: javadoc
73      *
74      * @throws SQLException
75      */

76     public void execute() throws SQLException {
77         db.touchSchema(_schema);
78         db.touchTable(_schema, _table);
79     }
80 }
Popular Tags