01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/field/db/TKFieldAttributeTableData.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 TKFieldAttributeTableData extends TKDBTableData {
12: public int form_id;
13: public int field_id;
14: public String name;
15: public int idx;
16: public String value;
17:
18: public TKFieldAttributeTableData() {
19: }
20:
21: public TKFieldAttributeTableData(int form_id, int field_id,
22: String name, int idx, String value) {
23: this .form_id = form_id;
24: this .field_id = field_id;
25: this .name = name;
26: this .idx = idx;
27: this .value = value;
28: }
29:
30: public TKFieldAttributeTableData(ResultSet rs) throws SQLException {
31: this .form_id = rs.getInt("FORM_ID");
32: this .field_id = rs.getInt("FIELD_ID");
33: this .name = rs.getString("NAME");
34: this .idx = rs.getInt("IDX");
35: this .value = rs.getString("VALUE");
36: }
37:
38: public TKDBTableData newFromResultSet(ResultSet r)
39: throws SQLException {
40: return new TKFieldAttributeTableData(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("NAME", name);
47: query.setQueryParams("IDX", new Integer(idx));
48: query.setQueryParams("VALUE", value);
49: }
50:
51: public String toString() {
52: return "( FORM_ID=" + String.valueOf(form_id) + ", FIELD_ID="
53: + String.valueOf(field_id) + ", NAME=" + name
54: + ", IDX=" + String.valueOf(idx) + ", VALUE=" + value
55: + ")\n";
56: }
57: //{{DECLARE_CONTROLS
58: //}}
59: }
|