]> WPIA git - gigi.git/blob - src/org/cacert/gigi/database/GigiResultSet.java
UPD: Correct reping (with 5min rate limiting)
[gigi.git] / src / org / cacert / gigi / database / GigiResultSet.java
1 package org.cacert.gigi.database;
2
3 import java.sql.Date;
4 import java.sql.ResultSet;
5 import java.sql.SQLException;
6 import java.sql.Timestamp;
7
8 public class GigiResultSet {
9
10     ResultSet target;
11
12     public GigiResultSet(ResultSet target) {
13         this.target = target;
14     }
15
16     public String getString(int columnIndex) {
17         try {
18             return target.getString(columnIndex);
19         } catch (SQLException e) {
20             handleSQL(e);
21             throw new Error(e);
22         }
23     }
24
25     public boolean getBoolean(int columnIndex) {
26         try {
27             return target.getBoolean(columnIndex);
28         } catch (SQLException e) {
29             handleSQL(e);
30             throw new Error(e);
31         }
32     }
33
34     public int getInt(int columnIndex) {
35         try {
36             return target.getInt(columnIndex);
37         } catch (SQLException e) {
38             handleSQL(e);
39             throw new Error(e);
40         }
41     }
42
43     public Date getDate(int columnIndex) {
44         try {
45             return target.getDate(columnIndex);
46         } catch (SQLException e) {
47             handleSQL(e);
48             throw new Error(e);
49         }
50     }
51
52     public Timestamp getTimestamp(int columnIndex) {
53         try {
54             return target.getTimestamp(columnIndex);
55         } catch (SQLException e) {
56             handleSQL(e);
57             throw new Error(e);
58         }
59     }
60
61     public String getString(String columnLabel) {
62         try {
63             return target.getString(columnLabel);
64         } catch (SQLException e) {
65             handleSQL(e);
66             throw new Error(e);
67         }
68     }
69
70     public boolean getBoolean(String columnLabel) {
71         try {
72             return target.getBoolean(columnLabel);
73         } catch (SQLException e) {
74             handleSQL(e);
75             throw new Error(e);
76         }
77     }
78
79     public int getInt(String columnLabel) {
80         try {
81             return target.getInt(columnLabel);
82         } catch (SQLException e) {
83             handleSQL(e);
84             throw new Error(e);
85         }
86     }
87
88     public Date getDate(String columnLabel) {
89         try {
90             return target.getDate(columnLabel);
91         } catch (SQLException e) {
92             handleSQL(e);
93             throw new Error(e);
94         }
95     }
96
97     public Timestamp getTimestamp(String columnLabel) {
98         try {
99             return target.getTimestamp(columnLabel);
100         } catch (SQLException e) {
101             handleSQL(e);
102             throw new Error(e);
103         }
104     }
105
106     public boolean next() {
107         try {
108             return target.next();
109         } catch (SQLException e) {
110             handleSQL(e);
111             throw new Error(e);
112         }
113     }
114
115     public int getRow() {
116         try {
117             return target.getRow();
118         } catch (SQLException e) {
119             handleSQL(e);
120             throw new Error(e);
121         }
122     }
123
124     public void beforeFirst() {
125         try {
126             target.beforeFirst();
127         } catch (SQLException e) {
128             handleSQL(e);
129             throw new Error(e);
130         }
131     }
132
133     public void last() {
134         try {
135             target.last();
136         } catch (SQLException e) {
137             handleSQL(e);
138             throw new Error(e);
139         }
140     }
141
142     public void close() {
143         try {
144             target.close();
145         } catch (SQLException e) {
146             handleSQL(e);
147             throw new Error(e);
148         }
149
150     }
151
152     private void handleSQL(SQLException e) {
153         // TODO Auto-generated method stub
154
155     }
156
157 }