- public int getInt(int arg0) throws SQLException {
- throw new UnsupportedOperationException("Not yet implemented.");
-
+ public int getInt(int idx) throws SQLException {
+ Row row = mock_rows.get(mock_rowIdx);
+ Object obj = row.getValue(idx);
+ if (null == obj) {
+ return 0;
+ }
+ if (obj instanceof Number) {
+ Number num = (Number)obj;
+ return num.intValue();
+ }
+ throw new SQLException("Invalid type");