org.openmdx.compatibility.base.dataprovider.layer.persistence.jdbc
Class FastResultSet
java.lang.Object
org.openmdx.compatibility.base.dataprovider.layer.persistence.jdbc.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(AbstractDatabase_1 database,
ResultSet rs)
throws SQLException
- Throws:
SQLException
FastResultSet
public FastResultSet(AbstractDatabase_1 database,
ResultSet rs,
List columnNames)
throws SQLException
- Throws:
SQLException
getColumnNames
public static List 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
absolute
public boolean absolute(int position)
throws SQLException
- Throws:
SQLException
getColumnNames
public List getColumnNames()
toJdbcObject
protected Object toJdbcObject(Object nativeObject)
throws SQLException
- Throws:
SQLException
This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.