uk.org.ogsadai.converters.webrowset.resultset
Class WebRowSetToResultSet
java.lang.Object
|
+--uk.org.ogsadai.converters.webrowset.resultset.WebRowSetToResultSet
- public class WebRowSetToResultSet
- extends java.lang.Object
Converts an WebRowSet XML document into a java.sql.ResultSet
object.
The default type of ResultSet is ResultSet.TYPE_FORWARD_ONLY
but this can be changed via the setResultSetType()
method.
- Author:
- The OGSA-DAI Team.
Constructor Summary |
WebRowSetToResultSet(java.io.Reader reader)
Construct a new converter from the given input reader. |
Method Summary |
java.sql.ResultSet |
getResultSet()
Return the ResultSet that has been created from the WebRowSet document provided by the input reader. |
void |
setResultSetType(int type)
Set the ResultSet type to scrollable or forward-only. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
- See Also:
- Constant Field Values
mType
private int mType
-
mInput
private java.io.Reader mInput
-
WebRowSetToResultSet
public WebRowSetToResultSet(java.io.Reader reader)
-
Construct a new converter from the given input reader.
- Parameters:
reader
- An input reader configured to read a WebRowSet document.
setResultSetType
public void setResultSetType(int type)
throws java.lang.IllegalArgumentException
-
Set the ResultSet type to scrollable or forward-only.
-
- Parameters:
type
- one of ResultSet.TYPE_SCROLL_INSENSITIVE
or ResultSet.TYPE_FORWARD_ONLY
.
- Throws:
java.lang.IllegalArgumentException
- if the type is not one of the two above.
getResultSet
public java.sql.ResultSet getResultSet()
throws WebRowSetResultSetParseException
-
Return the ResultSet that has been created from the WebRowSet document provided by the input reader.
-
- Returns:
- ResultSet
- Throws:
WebRowSetResultSetException
- if there was a problem in parsing the WebRowSet document into the ResultSet.
WebRowSetResultSetParseException