01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/refsel/TKWMSubtreeRS.java,v 1.4 2002/01/14 12:46:31 mischa 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: /**
14: * liefert alle Knoten unterhalb des Startknotens in einer flachen
15: * Liste
16: * @author $Author: mischa $
17: * @version $Revision: 1.4 $
18: */
19: public class TKWMSubtreeRS extends TKWMAllNodesSelector {
20:
21: public boolean checkSelection() {
22: return false;
23: }
24:
25: public String getSelectionData(TKHashtable params) {
26: return "";
27: }
28:
29: public TKVector getSelectionNodes(String selectionData,
30: int siteNodeId) throws SQLException {
31: TKVector nodes = new TKVector();
32: TKQuery query = TKDBManager.newQuery(TKWMDBSubtreeNodes.class);
33: query.setQueryParams("SITE_NODE_ID", new Integer(siteNodeId));
34: query.execute();
35: ResultSet rs = query.fetchResultSet();
36:
37: if (rs != null) {
38: while (rs.next()) {
39: Integer value = new Integer(rs.getInt("SITE_NODE_ID"));
40: nodes.addElement(value);
41: }
42: }
43: return nodes;
44: }
45:
46: public TKDBResult getSelectionValues(String selectionData,
47: int siteNodeId) throws SQLException {
48: TKDBResult values = null;
49:
50: TKQuery query = TKDBManager.newQuery(TKWMDBRSSisters.class);
51: query.setQueryParams("SITE_NODE_ID", new Integer(siteNodeId));
52: query.execute();
53: ResultSet rs = query.fetchResultSet();
54:
55: if (rs != null) {
56: values = new TKDBResult(rs);
57: }
58: return values;
59: }
60: }
|