public abstract class ResultSet
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ResultSet.Blob
An implementation of IBlog for byte arrays.
|
protected static class |
ResultSet.Clob
An implementation of IClob for strings.
|
protected static class |
ResultSet.EClass
A set of results that contains instances of classes.
|
protected static class |
ResultSet.EDataType
A set of results that contains values of data types.
|
static class |
ResultSet.JavaObject
A wrapper for Java objects which works around the fact that EMF objects are not (Java)
serializable and which provides a formatted text representation.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
cursor |
protected int |
maxRows |
protected EList<?> |
results |
protected boolean |
wasNull |
| Modifier | Constructor and Description |
|---|---|
protected |
ResultSet(EList<?> results) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static IResultSet |
create(EClassifier type,
EList<?> results)
Creates a result set of the appropriate kind, depending on whether the specified
list of results contains instances of classes or values of data types.
|
java.math.BigDecimal |
getBigDecimal(int index) |
java.math.BigDecimal |
getBigDecimal(java.lang.String columnName) |
IBlob |
getBlob(int index) |
IBlob |
getBlob(java.lang.String columnName) |
boolean |
getBoolean(int index) |
boolean |
getBoolean(java.lang.String columnName) |
IClob |
getClob(int index) |
IClob |
getClob(java.lang.String columnName) |
java.sql.Date |
getDate(int index) |
java.sql.Date |
getDate(java.lang.String columnName) |
double |
getDouble(int index) |
double |
getDouble(java.lang.String columnName) |
int |
getInt(int index) |
int |
getInt(java.lang.String columnName) |
java.lang.Object |
getObject(int index) |
java.lang.Object |
getObject(java.lang.String columnName) |
int |
getRow() |
java.lang.String |
getString(int index) |
java.lang.String |
getString(java.lang.String columnName) |
java.sql.Time |
getTime(int index) |
java.sql.Time |
getTime(java.lang.String columnName) |
java.sql.Timestamp |
getTimestamp(int index) |
java.sql.Timestamp |
getTimestamp(java.lang.String columnName) |
protected abstract java.lang.Object |
getValue(int index)
Returns the value (of the feature) at the specified index.
|
boolean |
next() |
void |
setMaxRows(int max) |
boolean |
wasNull() |
protected final EList<?> results
protected int maxRows
protected int cursor
protected boolean wasNull
protected ResultSet(EList<?> results)
public static IResultSet create(EClassifier type, EList<?> results)
type - the type of objects in the list of resultsresults - the list of results from executing a querypublic void setMaxRows(int max)
throws OdaException
OdaExceptionpublic boolean next()
throws OdaException
OdaExceptionpublic void close()
throws OdaException
OdaExceptionpublic int getRow()
throws OdaException
OdaExceptionprotected abstract java.lang.Object getValue(int index)
throws OdaException
index - the 1-based index of the desired valueOdaException - if data source error occurspublic java.lang.String getString(int index)
throws OdaException
OdaExceptionpublic java.lang.String getString(java.lang.String columnName)
throws OdaException
OdaExceptionpublic int getInt(int index)
throws OdaException
OdaExceptionpublic int getInt(java.lang.String columnName)
throws OdaException
OdaExceptionpublic double getDouble(int index)
throws OdaException
OdaExceptionpublic double getDouble(java.lang.String columnName)
throws OdaException
OdaExceptionpublic java.math.BigDecimal getBigDecimal(int index)
throws OdaException
OdaExceptionpublic java.math.BigDecimal getBigDecimal(java.lang.String columnName)
throws OdaException
OdaExceptionpublic java.sql.Date getDate(int index)
throws OdaException
OdaExceptionpublic java.sql.Date getDate(java.lang.String columnName)
throws OdaException
OdaExceptionpublic java.sql.Time getTime(int index)
throws OdaException
OdaExceptionpublic java.sql.Time getTime(java.lang.String columnName)
throws OdaException
OdaExceptionpublic java.sql.Timestamp getTimestamp(int index)
throws OdaException
OdaExceptionpublic java.sql.Timestamp getTimestamp(java.lang.String columnName)
throws OdaException
OdaExceptionpublic IBlob getBlob(int index)
throws OdaException
OdaExceptionpublic IBlob getBlob(java.lang.String columnName)
throws OdaException
OdaExceptionpublic IClob getClob(int index)
throws OdaException
OdaExceptionpublic IClob getClob(java.lang.String columnName)
throws OdaException
OdaExceptionpublic boolean getBoolean(int index)
throws OdaException
OdaExceptionpublic boolean getBoolean(java.lang.String columnName)
throws OdaException
OdaExceptionpublic java.lang.Object getObject(int index)
throws OdaException
OdaExceptionpublic java.lang.Object getObject(java.lang.String columnName)
throws OdaException
OdaExceptionpublic boolean wasNull()
throws OdaException
OdaException