1
2 package net.sf.voruta;
3
4 /***
5 *
6 * @author baliuka
7 */
8 public class MockDbResultSet implements DbResultSet{
9
10 int currentRow = -1;
11 String names [];
12 Object objects[][];
13 /*** Creates a new instance of MockDbResultSet */
14 public MockDbResultSet( String names[], Object objects[][] ) {
15 this.names = names;
16 this.objects = objects;
17 }
18
19 public void close() {
20 }
21
22 public Object get(int index) {
23
24 return objects[currentRow][index];
25 }
26
27 public String[] getNames() {
28 return names;
29 }
30
31 public void reset(){
32 currentRow = -1;
33 }
34
35 public boolean next() {
36
37 return objects.length > ++currentRow;
38
39 }
40
41 public java.sql.ResultSet getResultSet() {
42 throw new UnsupportedOperationException();
43 }
44
45 }
This page was automatically generated by Maven