org.opencrx.kernel.tools
Class FastResultSet
java.lang.Object
org.opencrx.kernel.tools.FastResultSet
public class FastResultSet
- extends Object
FastResultSet
Optimizes the access to a ResultSet and guarantees that a column is read
at most once. This is required because for certain jdbc drivers (e.g.
JdbcOdbc driver in .NET) a) rs.getObject() is very slow and b) may be
called at most once.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastResultSet
public FastResultSet(ResultSet rs)
throws SQLException
- Throws:
SQLException
FastResultSet
public FastResultSet(ResultSet rs,
List<String> columnNames)
throws SQLException
- Throws:
SQLException
getColumnNames
public static List<String> getColumnNames(ResultSetMetaData rsmd)
throws SQLException
- Throws:
SQLException
getObject
public Object getObject(String columnName)
throws SQLException
- Reads specified column from result set. Guarantees that columns
OBJECT_OID, OBJECT_RID and OBJECT_IDX are read at most once otherwise
error 'ResultSet can not re-read row data for column' is thrown by
certain JDBC drivers.
- Throws:
SQLException
reset
public void reset()
throws SQLException
- Throws:
SQLException
next
public boolean next()
throws SQLException
- Throws:
SQLException
getColumnNames
public List<String> getColumnNames()
close
public void close()
throws SQLException
- Throws:
SQLException
This software is published under the BSD license. Copyright © 2003-2012, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.