1 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 19 public class TKWMSubtreeRS extends TKWMAllNodesSelector { 20 21 public boolean checkSelection( ) { 22 return false; 23 } 24 public String getSelectionData( TKHashtable params ){ 25 return ""; 26 } 27 28 public TKVector getSelectionNodes(String selectionData, int siteNodeId ) 29 throws SQLException 30 { 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 { 39 while (rs.next()) { 40 Integer value = new Integer (rs.getInt("SITE_NODE_ID")); 41 nodes.addElement(value); 42 } 43 } 44 return nodes; 45 } 46 47 public TKDBResult getSelectionValues( String selectionData, int siteNodeId ) 48 throws SQLException 49 { 50 TKDBResult values=null; 51 52 TKQuery query = TKDBManager.newQuery(TKWMDBRSSisters.class); 53 query.setQueryParams("SITE_NODE_ID", new Integer (siteNodeId)); 54 query.execute(); 55 ResultSet rs = query.fetchResultSet(); 56 57 if (rs != null) { 58 values = new TKDBResult(rs); 59 } 60 return values; 61 } 62 } 63 64 | Popular Tags |