01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/field/db/TKSubFieldTableData.java,v 1.6 2000/06/01 15:02:55 alex Exp $
03: *
04: */
05: package com.teamkonzept.field.db;
06:
07: import java.sql.*;
08:
09: import com.teamkonzept.db.*;
10:
11: public class TKSubFieldTableData extends TKDBTableData {
12: public int form_id;
13: public int field_id;
14: public int sub_field_id;
15: public String name;
16: public int idx;
17:
18: public TKSubFieldTableData() {
19: }
20:
21: public TKSubFieldTableData(int form_id, int field_id,
22: int sub_field_id, String name, int idx) {
23: this .form_id = form_id;
24: this .field_id = field_id;
25: this .sub_field_id = sub_field_id;
26: this .name = name;
27: this .idx = idx;
28: }
29:
30: public TKSubFieldTableData(ResultSet rs) throws SQLException {
31: this .form_id = rs.getInt("FORM_ID");
32: this .field_id = rs.getInt("FIELD_ID");
33: this .sub_field_id = rs.getInt("SUB_FIELD_ID");
34: this .name = rs.getString("NAME");
35: this .idx = rs.getInt("IDX");
36: }
37:
38: public TKDBTableData newFromResultSet(ResultSet r)
39: throws SQLException {
40: return new TKSubFieldTableData(r);
41: }
42:
43: public void insertIntoQuery(TKQuery query) throws SQLException {
44: query.setQueryParams("FORM_ID", new Integer(form_id));
45: query.setQueryParams("FIELD_ID", new Integer(field_id));
46: query.setQueryParams("SUB_FIELD_ID", new Integer(sub_field_id));
47: query.setQueryParams("NAME", name);
48: query.setQueryParams("IDX", new Integer(idx));
49: }
50:
51: public String toString() {
52: return "( FORM_ID=" + String.valueOf(form_id) + ", FIELD_ID="
53: + String.valueOf(field_id) + ", SUB_FIELD_ID="
54: + String.valueOf(sub_field_id) + ", NAME=" + name
55: + ", IDX=" + String.valueOf(idx) + ")\n";
56: }
57: //{{DECLARE_CONTROLS
58: //}}
59: }
|