KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > teamkonzept > webman > refsel > TKWMSistersRS


1 /*
2  * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/webman/refsel/TKWMSistersRS.java,v 1.5 2000/05/22 15:01:52 careck Exp $
3  *
4  */

5 package com.teamkonzept.webman.refsel;
6
7 import java.sql.*;
8
9 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     public String JavaDoc getSelectionData( TKHashtable params ){
19         return "";
20     }
21
22     public TKVector getSelectionNodes(String JavaDoc selectionData, int siteNodeId )
23         throws SQLException
24     {
25         TKVector nodes= new TKVector();
26
27         TKQuery query = TKDBManager.newQuery(TKWMDBSisterNodes.class);
28         query.setQueryParams("SITE_NODE_ID", new Integer JavaDoc(siteNodeId));
29         query.execute();
30         ResultSet rs = query.fetchResultSet();
31
32         if (rs != null) {
33             while (rs.next()) {
34                 nodes.addElement(new Integer JavaDoc(rs.getInt("SITE_NODE_ID")));
35             }
36         }
37         return nodes;
38     }
39
40     public TKDBResult getSelectionValues( String JavaDoc selectionData, int siteNodeId )
41         throws SQLException
42     {
43         TKDBResult values=null;
44
45         TKQuery query = TKDBManager.newQuery(TKWMDBRSSisters.class);
46         query.setQueryParams("SITE_NODE_ID", new Integer JavaDoc(siteNodeId));
47         query.execute();
48         ResultSet rs = query.fetchResultSet();
49
50         if (rs != null) {
51             values = new TKDBResult(rs);
52         }
53         return values;
54
55     }
56
57 }
58
59
Popular Tags