1 package com.teamkonzept.webman.refsel; 2 3 import java.sql.*; 4 5 import com.teamkonzept.db.*; 6 import com.teamkonzept.lib.*; 7 import com.teamkonzept.webman.*; 8 import de.webman.generator.*; 9 import com.teamkonzept.webman.refsel.db.queries.*; 10 11 public class TKWMFirstRS implements TKWMReferenceSelector { 12 13 public boolean checkSelection( ) { 14 return false; 15 } 16 public String getSelectionData( TKHashtable params ){ 17 return ""; 18 } 19 20 public TKVector getSelectionNodes(String selectionData, int siteNodeId ) 21 throws SQLException 22 { 23 TKVector nodes= new TKVector(1); 24 nodes.addElement( new Integer ( siteNodeId ) ); 25 return nodes; 26 } 27 28 public TKDBResult getSelectionValues( String selectionData, int siteNodeId ) 29 throws SQLException 30 { 31 TKDBResult values=null; 32 33 TKQuery query = TKDBManager.newQuery(TKWMDBRSSisters.class); 34 query.setQueryParams("SITE_NODE_ID", new Integer (siteNodeId)); 35 query.execute(); 36 ResultSet rs = query.fetchResultSet(); 37 38 if (rs != null) { 39 values = new TKDBResult(rs); 40 } 41 return values; 42 } 43 44 public void reduceReferences( 45 String selectionData, 46 TKVector allRefUrls, 47 TKVector allRefDocs, 48 TKVector allRefNodes, 49 GenNode currAnchor 50 ) 51 { 52 for( int i=allRefUrls.size()-1; i>0; i-- ) { 53 allRefUrls.removeElementAt(i); 55 if( allRefDocs!=null ) allRefDocs.removeElementAt(i); 56 allRefNodes.removeElementAt(i); 57 } 58 } 59 60 } 61 62 | Popular Tags |