1
2 package net.sf.voruta;
3
4 /***
5 *
6 * @author baliuka
7 */
8 public class DemoHandler implements ResultSetHandler{
9
10 /*** Creates a new instance of DemoHandler */
11 public DemoHandler() {
12 }
13
14 public Object handle(DbResultSet rs,Class type, Object p[]) throws Exception {
15
16 java.io.PrintStream out = (java.io.PrintStream)p[0];
17
18 int cnt = 0;
19 String names [] = rs.getNames();
20 for(int i = 0; i < names.length; i++ ){
21 out.print(names[ i ] + "\t");
22 }
23
24 while(rs.next()){
25 cnt++;
26 out.println();
27 for(int i = 0; i < names.length; i++ ){
28 out.print( rs.get( i ) + "\t" );
29 }
30
31 }
32 out.println();
33 return new Integer(cnt);
34 }
35
36
37 }
This page was automatically generated by Maven