@Override public InputStream getBinaryStream(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof InputStream) { return (InputStream)cell; } else { throw new SQLException("Column is not an input stream"); } }
@Override public Reader getCharacterStream(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Reader) { return (Reader)cell; } else { throw new SQLException("Column is not an character stream"); } }
@Override public Array getArray(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Array) { return (Array)cell; } else { throw new SQLException("Not instance of Array class"); } }
@Override public String getString(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } else { return cell.toString(); } }
@Override public InputStream getAsciiStream(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof InputStream) { return (InputStream)cell; } else { throw new SQLException("Column is not an input stream"); } }
@Override public Clob getClob(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Clob) { return (Clob)cell; } else { throw new SQLException("Not instance of Clob class"); } }
@Override public InputStream getUnicodeStream(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof InputStream) { return (InputStream)cell; } else { throw new SQLException("Column is not an input stream"); } }
@Override public Ref getRef(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Ref) { return (Ref)cell; } else { throw new SQLException("Not instance of Ref class"); } }
@Override public Blob getBlob(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Blob) { return (Blob)cell; } else { throw new SQLException("Not instance of Blob class"); } }
@Override public SQLXML getSQLXML(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof SQLXML) { return (SQLXML)cell; } else { throw new SQLException("Not instance of SQLXML class"); } }
@Override public Geometry getGeometry(String columnLabel) throws SQLException { Object field = getObject(columnLabel); if(field==null) { return null; } if(field instanceof Geometry) { return (Geometry)field; } else { throw new SQLException("The column "+columnLabel+ " is not a Geometry"); } }
@Override public String getString(String s) throws SQLException { Object cell = getObject(s); if(cell == null) { return null; } else { return cell.toString(); } }
@Override public java.net.URL getURL(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof URL) { return (URL)cell; } else { throw new SQLException("Not instance of URL class"); } }
@Override public NClob getNClob(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof NClob) { return (NClob)cell; } else { throw new SQLException("Not instance of NClob class"); } }
@Override public Reader getNCharacterStream(int i) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } if(cell instanceof Reader) { return (Reader)cell; } else { throw new SQLException("Not instance of URL class"); } }
@Override public BigDecimal getBigDecimal(int i, int i2) throws SQLException { Object cell = getObject(i); if(cell == null) { return null; } try { return new BigDecimal(cell.toString()); } catch (Exception ex) { throw new SQLException(ex); } }
@Override public <T> T getObject(int i, Class<T> tClass) throws SQLException { Object obj = getObject(i); if(obj == null) { return null; } if(tClass == null || !tClass.isInstance(obj)) { throw new SQLException(obj.getClass().getSimpleName()+" not instance of " + (tClass == null ? "NULL" : tClass.getSimpleName())); } return tClass.cast(obj); }
@Override public <T> T getObject(String s, Class<T> tClass) throws SQLException { return getObject(findColumn(s), tClass); } @Override
@Override public Geometry getGeometry(int columnIndex) throws SQLException { Object field = getObject(columnIndex); if(field==null) { return null; } if(field instanceof Geometry) { return (Geometry)field; } else { throw new SQLException("The column "+getMetaData().getColumnName(columnIndex)+ " is not a Geometry"); } }
@Override public Object getObject(String s) throws SQLException { return getObject(findColumn(s)); }