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
OdaException
public boolean next() throws OdaException
OdaException
public void close() throws OdaException
OdaException
public int getRow() throws OdaException
OdaException
protected 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
OdaException
public java.lang.String getString(java.lang.String columnName) throws OdaException
OdaException
public int getInt(int index) throws OdaException
OdaException
public int getInt(java.lang.String columnName) throws OdaException
OdaException
public double getDouble(int index) throws OdaException
OdaException
public double getDouble(java.lang.String columnName) throws OdaException
OdaException
public java.math.BigDecimal getBigDecimal(int index) throws OdaException
OdaException
public java.math.BigDecimal getBigDecimal(java.lang.String columnName) throws OdaException
OdaException
public java.sql.Date getDate(int index) throws OdaException
OdaException
public java.sql.Date getDate(java.lang.String columnName) throws OdaException
OdaException
public java.sql.Time getTime(int index) throws OdaException
OdaException
public java.sql.Time getTime(java.lang.String columnName) throws OdaException
OdaException
public java.sql.Timestamp getTimestamp(int index) throws OdaException
OdaException
public java.sql.Timestamp getTimestamp(java.lang.String columnName) throws OdaException
OdaException
public IBlob getBlob(int index) throws OdaException
OdaException
public IBlob getBlob(java.lang.String columnName) throws OdaException
OdaException
public IClob getClob(int index) throws OdaException
OdaException
public IClob getClob(java.lang.String columnName) throws OdaException
OdaException
public boolean getBoolean(int index) throws OdaException
OdaException
public boolean getBoolean(java.lang.String columnName) throws OdaException
OdaException
public java.lang.Object getObject(int index) throws OdaException
OdaException
public java.lang.Object getObject(java.lang.String columnName) throws OdaException
OdaException
public boolean wasNull() throws OdaException
OdaException