|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kodo.jdbc.sql.AbstractResult
A Result implementation designed to be subclassed easily by
implementations. All get<type> calls are delegated to
the getObjectInternal(Object,int,Object,Joins) method, which
should be implemented by subclasses along with nextInternal(),
containsInternal(java.lang.Object, kodo.jdbc.sql.Joins), and Result.size().
Most of the methods of this class will accept return values from
getObjectInternal(Object,int,Object,Joins) that are not exactly
the right type. For example, any numeric type can be returned as any
Number type, and dates, locales, characters, and booleans can be
returned as strings.
ResultSetResult| Constructor Summary | |
AbstractResult()
|
|
| Method Summary | |
boolean |
absolute(int row)
Throws an exception by default. |
protected Object |
checkNull(Object val)
|
void |
close()
Closes all eager results. |
boolean |
contains(Column col,
Joins joins)
Return true if the given or column is available in the result. |
boolean |
contains(Object obj)
Return true if the given or id or column is available in the result. |
protected abstract boolean |
containsInternal(Object obj,
Joins joins)
Return whether this result contains data for the given id or column. |
Array |
getArray(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Array |
getArray(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Array |
getArrayInternal(Object obj,
Joins joins)
|
InputStream |
getAsciiStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
InputStream |
getAsciiStream(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected InputStream |
getAsciiStreamInternal(Object obj,
Joins joins)
|
BigDecimal |
getBigDecimal(Column col,
Joins joins)
Return the value stored in the given column. |
BigDecimal |
getBigDecimal(Object obj)
Return the value stored in the given column or id. |
protected BigDecimal |
getBigDecimalInternal(Object obj,
Joins joins)
|
BigInteger |
getBigInteger(Column col,
Joins joins)
Return the value stored in the given column. |
BigInteger |
getBigInteger(Object obj)
Return the value stored in the given column or id. |
protected BigInteger |
getBigIntegerInternal(Object obj,
Joins joins)
|
InputStream |
getBinaryStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
InputStream |
getBinaryStream(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected InputStream |
getBinaryStreamInternal(Object obj,
Joins joins)
|
Blob |
getBlob(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Blob |
getBlob(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Blob |
getBlobInternal(Object obj,
Joins joins)
|
boolean |
getBoolean(Column col,
Joins joins)
Return the value stored in the given column. |
boolean |
getBoolean(Object obj)
Return the value stored in the given column or id. |
protected boolean |
getBooleanInternal(Object obj,
Joins joins)
|
byte |
getByte(Column col,
Joins joins)
Return the value stored in the given column. |
byte |
getByte(Object obj)
Return the value stored in the given column or id. |
protected byte |
getByteInternal(Object obj,
Joins joins)
|
byte[] |
getBytes(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
byte[] |
getBytes(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected byte[] |
getBytesInternal(Object obj,
Joins joins)
|
char |
getChar(Column col,
Joins joins)
Return the value stored in the given column. |
char |
getChar(Object obj)
Return the value stored in the given column or id. |
Reader |
getCharacterStream(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Reader |
getCharacterStream(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Reader |
getCharacterStreamInternal(Object obj,
Joins joins)
|
protected char |
getCharInternal(Object obj,
Joins joins)
|
Clob |
getClob(Column col,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Clob |
getClob(Object obj)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Clob |
getClobInternal(Object obj,
Joins joins)
|
Date |
getDate(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Date |
getDate(Column col,
Joins joins)
Return the value stored in the given column. |
Date |
getDate(Object obj)
Return the value stored in the given column or id. |
Date |
getDate(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Date |
getDateInternal(Object obj,
Calendar cal,
Joins joins)
|
protected Date |
getDateInternal(Object obj,
Joins joins)
|
double |
getDouble(Column col,
Joins joins)
Return the value stored in the given column. |
double |
getDouble(Object obj)
Return the value stored in the given column or id. |
protected double |
getDoubleInternal(Object obj,
Joins joins)
|
Result |
getEager(Object key)
Return the eager result for the given key, or null if none. |
float |
getFloat(Column col,
Joins joins)
Return the value stored in the given column. |
float |
getFloat(Object obj)
Return the value stored in the given column or id. |
protected float |
getFloatInternal(Object obj,
Joins joins)
|
int |
getInt(Column col,
Joins joins)
Return the value stored in the given column. |
int |
getInt(Object obj)
Return the value stored in the given column or id. |
protected int |
getIntInternal(Object obj,
Joins joins)
|
Locale |
getLocale(Column col,
Joins joins)
Return the value stored in the given column. |
Locale |
getLocale(Object obj)
Return the value stored in the given column or id. |
protected Locale |
getLocaleInternal(Object obj,
Joins joins)
|
long |
getLong(Column col,
Joins joins)
Return the value stored in the given column. |
long |
getLong(Object obj)
Return the value stored in the given column or id. |
protected long |
getLongInternal(Object obj,
Joins joins)
|
Object |
getObject(Column col,
int metaType,
Object arg,
Joins joins)
Return the value stored in the given column. |
Object |
getObject(Column col,
Map map,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Object |
getObject(Object obj,
int metaType,
Object arg)
Return the value stored in the given column or id. |
Object |
getObject(Object obj,
Map map)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected abstract Object |
getObjectInternal(Object obj,
int metaType,
Object arg,
Joins joins)
Return the value stored in the given id or column. |
protected Object |
getObjectInternal(Object obj,
Map map,
Joins joins)
|
Object |
getProcessed(Object key)
Return the processed data under the given key, or null if none. |
Ref |
getRef(Column col,
Map map,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Ref |
getRef(Object obj,
Map map)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Ref |
getRefInternal(Object obj,
Map map,
Joins joins)
|
short |
getShort(Column col,
Joins joins)
Return the value stored in the given column. |
short |
getShort(Object obj)
Return the value stored in the given column or id. |
protected short |
getShortInternal(Object obj,
Joins joins)
|
String |
getString(Column col,
Joins joins)
Return the value stored in the given column. |
String |
getString(Object obj)
Return the value stored in the given column or id. |
protected String |
getStringInternal(Object obj,
Joins joins)
|
Time |
getTime(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Time |
getTime(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Time |
getTimeInternal(Object obj,
Calendar cal,
Joins joins)
|
Timestamp |
getTimestamp(Column col,
Calendar cal,
Joins joins)
Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set. |
Timestamp |
getTimestamp(Object obj,
Calendar cal)
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set. |
protected Timestamp |
getTimestampInternal(Object obj,
Calendar cal,
Joins joins)
|
boolean |
isLocking()
If true, then any results loaded from this Result will be locked in the database. |
Object |
load(ClassMapping mapping,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
Load a pc object using the given store manager. |
Object |
load(ClassMapping mapping,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Joins joins)
Load a pc object using the given store manager. |
Joins |
newJoins()
Returns a no-op joins object by default. |
boolean |
next()
Advance to the next row, or return false if there are no more rows in the result. |
protected abstract boolean |
nextInternal()
Advance this row. |
void |
pushBack()
Push back the last result. |
void |
putEager(Object key,
Result res)
|
void |
putProcessed(Object key,
Object data)
Set the data resulting from processing an eager result. |
void |
setLocking(boolean locking)
|
boolean |
supportsRandomAccess()
Returns false by default. |
boolean |
wasNull()
Return true if the last value fetched was null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface kodo.jdbc.sql.Result |
size |
| Constructor Detail |
public AbstractResult()
| Method Detail |
public Result getEager(Object key)
ResultgetEager in interface Result
public void putEager(Object key,
Result res)
public Object getProcessed(Object key)
ResultgetProcessed in interface Result
public void putProcessed(Object key,
Object data)
ResultputProcessed in interface Resultpublic void close()
close in interface Result
public boolean supportsRandomAccess()
throws SQLException
supportsRandomAccess in interface Result
public boolean absolute(int row)
throws SQLException
absolute in interface Result
public boolean next()
throws SQLException
Resultnext in interface Result
protected abstract boolean nextInternal()
throws SQLException
public void pushBack()
throws SQLException
ResultResult.next(). After the first time this method is called,
additional calls before a call to Result.next() or Result.absolute(int)
should have no further affect.pushBack in interface Resultpublic Joins newJoins()
newJoins in interface Result
public boolean contains(Object obj)
throws SQLException
Resultcontains in interface Result
public boolean contains(Column col,
Joins joins)
throws SQLException
Resultcontains in interface Result
protected abstract boolean containsInternal(Object obj,
Joins joins)
throws SQLException
public Object load(ClassMapping mapping,
JDBCStoreManager store,
JDBCFetchConfiguration fetch)
throws SQLException
Resultload in interface Result
public Object load(ClassMapping mapping,
JDBCStoreManager store,
JDBCFetchConfiguration fetch,
Joins joins)
throws SQLException
Resultload in interface Result
public Array getArray(Object obj)
throws SQLException
ResultgetArray in interface Result
public Array getArray(Column col,
Joins joins)
throws SQLException
ResultgetArray in interface Result
protected Array getArrayInternal(Object obj,
Joins joins)
throws SQLException
public InputStream getAsciiStream(Object obj)
throws SQLException
ResultgetAsciiStream in interface Result
public InputStream getAsciiStream(Column col,
Joins joins)
throws SQLException
ResultgetAsciiStream in interface Result
protected InputStream getAsciiStreamInternal(Object obj,
Joins joins)
throws SQLException
public BigDecimal getBigDecimal(Object obj)
throws SQLException
ResultgetBigDecimal in interface Result
public BigDecimal getBigDecimal(Column col,
Joins joins)
throws SQLException
ResultgetBigDecimal in interface Result
protected BigDecimal getBigDecimalInternal(Object obj,
Joins joins)
throws SQLException
public BigInteger getBigInteger(Object obj)
throws SQLException
ResultgetBigInteger in interface Result
public BigInteger getBigInteger(Column col,
Joins joins)
throws SQLException
ResultgetBigInteger in interface Result
protected BigInteger getBigIntegerInternal(Object obj,
Joins joins)
throws SQLException
public InputStream getBinaryStream(Object obj)
throws SQLException
ResultgetBinaryStream in interface Result
public InputStream getBinaryStream(Column col,
Joins joins)
throws SQLException
ResultgetBinaryStream in interface Result
protected InputStream getBinaryStreamInternal(Object obj,
Joins joins)
throws SQLException
public Blob getBlob(Object obj)
throws SQLException
ResultgetBlob in interface Result
public Blob getBlob(Column col,
Joins joins)
throws SQLException
ResultgetBlob in interface Result
protected Blob getBlobInternal(Object obj,
Joins joins)
throws SQLException
public boolean getBoolean(Object obj)
throws SQLException
ResultgetBoolean in interface Result
public boolean getBoolean(Column col,
Joins joins)
throws SQLException
ResultgetBoolean in interface Result
protected boolean getBooleanInternal(Object obj,
Joins joins)
throws SQLException
public byte getByte(Object obj)
throws SQLException
ResultgetByte in interface Result
public byte getByte(Column col,
Joins joins)
throws SQLException
ResultgetByte in interface Result
protected byte getByteInternal(Object obj,
Joins joins)
throws SQLException
public byte[] getBytes(Object obj)
throws SQLException
ResultgetBytes in interface Result
public byte[] getBytes(Column col,
Joins joins)
throws SQLException
ResultgetBytes in interface Result
protected byte[] getBytesInternal(Object obj,
Joins joins)
throws SQLException
public char getChar(Object obj)
throws SQLException
ResultgetChar in interface Result
public char getChar(Column col,
Joins joins)
throws SQLException
ResultgetChar in interface Result
protected char getCharInternal(Object obj,
Joins joins)
throws SQLException
public Reader getCharacterStream(Object obj)
throws SQLException
ResultgetCharacterStream in interface Result
public Reader getCharacterStream(Column col,
Joins joins)
throws SQLException
ResultgetCharacterStream in interface Result
protected Reader getCharacterStreamInternal(Object obj,
Joins joins)
throws SQLException
public Clob getClob(Object obj)
throws SQLException
ResultgetClob in interface Result
public Clob getClob(Column col,
Joins joins)
throws SQLException
ResultgetClob in interface Result
protected Clob getClobInternal(Object obj,
Joins joins)
throws SQLException
public Date getDate(Object obj)
throws SQLException
ResultgetDate in interface Result
public Date getDate(Column col,
Joins joins)
throws SQLException
ResultgetDate in interface Result
protected Date getDateInternal(Object obj,
Joins joins)
throws SQLException
public Date getDate(Object obj,
Calendar cal)
throws SQLException
ResultgetDate in interface Result
public Date getDate(Column col,
Calendar cal,
Joins joins)
throws SQLException
ResultgetDate in interface Result
protected Date getDateInternal(Object obj,
Calendar cal,
Joins joins)
throws SQLException
public double getDouble(Object obj)
throws SQLException
ResultgetDouble in interface Result
public double getDouble(Column col,
Joins joins)
throws SQLException
ResultgetDouble in interface Result
protected double getDoubleInternal(Object obj,
Joins joins)
throws SQLException
public float getFloat(Object obj)
throws SQLException
ResultgetFloat in interface Result
public float getFloat(Column col,
Joins joins)
throws SQLException
ResultgetFloat in interface Result
protected float getFloatInternal(Object obj,
Joins joins)
throws SQLException
public int getInt(Object obj)
throws SQLException
ResultgetInt in interface Result
public int getInt(Column col,
Joins joins)
throws SQLException
ResultgetInt in interface Result
protected int getIntInternal(Object obj,
Joins joins)
throws SQLException
public Locale getLocale(Object obj)
throws SQLException
ResultgetLocale in interface Result
public Locale getLocale(Column col,
Joins joins)
throws SQLException
ResultgetLocale in interface Result
protected Locale getLocaleInternal(Object obj,
Joins joins)
throws SQLException
public long getLong(Object obj)
throws SQLException
ResultgetLong in interface Result
public long getLong(Column col,
Joins joins)
throws SQLException
ResultgetLong in interface Result
protected long getLongInternal(Object obj,
Joins joins)
throws SQLException
public Object getObject(Object obj,
int metaType,
Object arg)
throws SQLException
ResultgetObject in interface Resultkodo.jdbc.sql.Resultobj - the column or id whose data to fetchmetaType - the type code from FieldMapping for the
type of the dataarg - some JDBC data access methods use an argument, such
as a Calendar or Map
public Object getObject(Column col,
int metaType,
Object arg,
Joins joins)
throws SQLException
ResultgetObject in interface Resultkodo.jdbc.sql.Resultcol - the column whose data to fetchmetaType - the type code from FieldMapping for the
type of the dataarg - some JDBC data access methods use an argument, such
as a Calendar or Map
protected abstract Object getObjectInternal(Object obj,
int metaType,
Object arg,
Joins joins)
throws SQLException
public Object getObject(Object obj,
Map map)
throws SQLException
ResultgetObject in interface Result
public Object getObject(Column col,
Map map,
Joins joins)
throws SQLException
ResultgetObject in interface Result
protected Object getObjectInternal(Object obj,
Map map,
Joins joins)
throws SQLException
public Ref getRef(Object obj,
Map map)
throws SQLException
ResultgetRef in interface Result
public Ref getRef(Column col,
Map map,
Joins joins)
throws SQLException
ResultgetRef in interface Result
protected Ref getRefInternal(Object obj,
Map map,
Joins joins)
throws SQLException
public short getShort(Object obj)
throws SQLException
ResultgetShort in interface Result
public short getShort(Column col,
Joins joins)
throws SQLException
ResultgetShort in interface Result
protected short getShortInternal(Object obj,
Joins joins)
throws SQLException
public String getString(Object obj)
throws SQLException
ResultgetString in interface Result
public String getString(Column col,
Joins joins)
throws SQLException
ResultgetString in interface Result
protected String getStringInternal(Object obj,
Joins joins)
throws SQLException
public Time getTime(Object obj,
Calendar cal)
throws SQLException
ResultgetTime in interface Result
public Time getTime(Column col,
Calendar cal,
Joins joins)
throws SQLException
ResultgetTime in interface Result
protected Time getTimeInternal(Object obj,
Calendar cal,
Joins joins)
throws SQLException
public Timestamp getTimestamp(Object obj,
Calendar cal)
throws SQLException
ResultgetTimestamp in interface Result
public Timestamp getTimestamp(Column col,
Calendar cal,
Joins joins)
throws SQLException
ResultgetTimestamp in interface Result
protected Timestamp getTimestampInternal(Object obj,
Calendar cal,
Joins joins)
throws SQLException
public boolean wasNull()
throws SQLException
ResultwasNull in interface Resultprotected Object checkNull(Object val)
public void setLocking(boolean locking)
public boolean isLocking()
ResultisLocking in interface Result
|
SolarMetric Kodo JDO 3.2.4 generated on January 7 2005 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||