01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/field/db/TKFormDBInterface.java,v 1.7 2000/06/19 14:06:46 alex Exp $
03: *
04: */
05: package com.teamkonzept.field.db;
06:
07: import java.sql.*;
08:
09: import com.teamkonzept.db.*;
10: import com.teamkonzept.field.db.queries.*;
11:
12: public class TKFormDBInterface extends TKDBVectorInterface {
13:
14: public final static String[] tables = { "FIELD", "SUB_FIELD",
15: "FIELD_ATTRIBUTE" };
16:
17: public final static Class deleteQuery = TKDBFormTablesDelete.class;
18: public final static Class[] putQueries = { TKDBFormFieldPut.class,
19: TKDBFormSubFieldPut.class, TKDBFormFieldAttrPut.class };
20:
21: public final static Class[] getQueries = { TKDBFormFieldGet.class,
22: TKDBFormSubFieldGet.class, TKDBFormFieldAttrGet.class };
23:
24: public final static Class newPrimQuery = TKDBFormNew.class;
25: public final static Class updatePrimQuery = TKDBFormUpdate.class;
26: public final static Class getPrimQuery = TKDBFormGet.class;
27: public final static Class delPrimQuery = TKDBFormDelete.class;
28:
29: public static TKFormDBInterface self = new TKFormDBInterface();
30:
31: public TKFormDBInterface() {
32: super (newPrimQuery, updatePrimQuery, getPrimQuery,
33: delPrimQuery, tables, putQueries, getQueries,
34: deleteQuery);
35: }
36:
37: public static void Put(TKFormDBData dbData) throws SQLException {
38: self.putEntry(dbData);
39: }
40:
41: public static void Get(TKFormDBData dbData) throws SQLException {
42: self.getEntry(dbData);
43: }
44:
45: public static void Del(TKFormDBData dbData) throws SQLException {
46: self.delEntry(dbData);
47: }
48:
49: public static void New(TKFormDBData dbData) throws SQLException {
50: self.newEntry(dbData);
51: }
52:
53: public void insertVectorElements(TKDBTableData d, TKQuery query,
54: String table, int i) throws SQLException {
55: query.setQueryParams("POS", new Integer(i));
56: d.insertIntoQuery(query);
57: }
58:
59: }
|