|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.converters.csv.resultset.CSVToResultSet
Converts a CSV formatted 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.
CSV file format can be set via the setConfigurator() method.
CSVConfigurator| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private CSVConfigurator |
mConfigurator
|
private java.io.Reader |
mInput
|
private int |
mType
|
| Constructor Summary | |
CSVToResultSet(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 CSV document provided by the input reader. |
void |
setConfigurator(CSVConfigurator configurator)
Set the Configurator describing CSV format. |
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 |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private int mType
private java.io.Reader mInput
private CSVConfigurator mConfigurator
| Constructor Detail |
public CSVToResultSet(java.io.Reader reader)
reader - An input reader.| Method Detail |
public void setConfigurator(CSVConfigurator configurator)
configurator -
public void setResultSetType(int type)
throws java.lang.IllegalArgumentException
type - one of
ResultSet.TYPE_SCROLL_INSENSITIVE or
ResultSet.TYPE_FORWARD_ONLY.
java.lang.IllegalArgumentException - if the type is not one of the
two above.
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException,
DAIIOException,
CSVParseException
DAIIOException - if there was a problem reading the input
java.sql.SQLException - if the result set could not be built
CSVParseException - if CSV file could not be paresed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||