01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/refsel/TKWMMotherRS.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 TKWMMotherRS 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(TKWMDBMotherNode.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.addElement(new Integer(rs
35: .getInt("SITE_NODE_PARENT")));
36: }
37: }
38: return nodes;
39: }
40:
41: public TKDBResult getSelectionValues(String selectionData,
42: int siteNodeId) throws SQLException {
43: TKDBResult values = null;
44:
45: TKQuery query = TKDBManager.newQuery(TKWMDBRSMother.class);
46:
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: }
|