01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/refsel/TKWMSistersRS.java,v 1.5 2000/05/22 15:01:52 careck Exp $
03: *
04: */
05: package com.teamkonzept.webman.refsel;
06:
07: import java.sql.*;
08:
09: import com.teamkonzept.db.*;
10: import com.teamkonzept.lib.*;
11: import com.teamkonzept.webman.refsel.db.queries.*;
12:
13: public class TKWMSistersRS extends TKWMAllNodesSelector {
14:
15: public boolean checkSelection() {
16: return false;
17: }
18:
19: public String getSelectionData(TKHashtable params) {
20: return "";
21: }
22:
23: public TKVector getSelectionNodes(String selectionData,
24: int siteNodeId) throws SQLException {
25: TKVector nodes = new TKVector();
26:
27: TKQuery query = TKDBManager.newQuery(TKWMDBSisterNodes.class);
28: query.setQueryParams("SITE_NODE_ID", new Integer(siteNodeId));
29: query.execute();
30: ResultSet rs = query.fetchResultSet();
31:
32: if (rs != null) {
33: while (rs.next()) {
34: nodes
35: .addElement(new Integer(rs
36: .getInt("SITE_NODE_ID")));
37: }
38: }
39: return nodes;
40: }
41:
42: public TKDBResult getSelectionValues(String selectionData,
43: int siteNodeId) throws SQLException {
44: TKDBResult values = null;
45:
46: TKQuery query = TKDBManager.newQuery(TKWMDBRSSisters.class);
47: query.setQueryParams("SITE_NODE_ID", new Integer(siteNodeId));
48: query.execute();
49: ResultSet rs = query.fetchResultSet();
50:
51: if (rs != null) {
52: values = new TKDBResult(rs);
53: }
54: return values;
55:
56: }
57:
58: }
|