1 5 package com.teamkonzept.field.db; 6 7 import java.sql.*; 8 9 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", "FIELD_ATTRIBUTE" }; 15 16 public final static Class deleteQuery = TKDBFormTablesDelete.class; 17 public final static Class [] putQueries = 18 { TKDBFormFieldPut.class, TKDBFormSubFieldPut.class, TKDBFormFieldAttrPut.class }; 19 20 public final static Class [] getQueries = 21 { TKDBFormFieldGet.class, TKDBFormSubFieldGet.class, TKDBFormFieldAttrGet.class }; 22 23 public final static Class newPrimQuery = TKDBFormNew.class; 24 public final static Class updatePrimQuery = TKDBFormUpdate.class; 25 public final static Class getPrimQuery = TKDBFormGet.class; 26 public final static Class delPrimQuery = TKDBFormDelete.class; 27 28 public static TKFormDBInterface self = new TKFormDBInterface(); 29 30 public TKFormDBInterface() { 31 super( 32 newPrimQuery, updatePrimQuery, getPrimQuery, delPrimQuery, 33 tables, putQueries, getQueries, deleteQuery); 34 } 35 36 public static void Put(TKFormDBData dbData) 37 throws SQLException 38 { 39 self.putEntry(dbData); 40 } 41 42 public static void Get(TKFormDBData dbData) 43 throws SQLException 44 { 45 self.getEntry(dbData); 46 } 47 48 public static void Del(TKFormDBData dbData) 49 throws SQLException 50 { 51 self.delEntry(dbData); 52 } 53 54 public static void New(TKFormDBData dbData) 55 throws SQLException 56 { 57 self.newEntry(dbData); 58 } 59 60 public void insertVectorElements(TKDBTableData d, TKQuery query, String table, int i) 61 throws SQLException 62 { 63 query.setQueryParams("POS", new Integer (i)); 64 d.insertIntoQuery( query ); 65 } 66 67 } 68 69 | Popular Tags |