Package org.apache.openjpa.jdbc.sql
Class AbstractResult
- java.lang.Object
-
- org.apache.openjpa.jdbc.sql.AbstractResult
-
- Direct Known Subclasses:
ResultSetResult
public abstract class AbstractResult extends Object implements Result
AResultimplementation designed to be subclassed easily by implementations. Allget<type>calls are delegated to thegetObjectInternal(Object,int,Object,Joins)method, which should be implemented by subclasses along withnextInternal(),containsInternal(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins), andResult.size(). Most of the methods of this class will accept return values fromgetObjectInternal(Object,int,Object,Joins)that are not exactly the right type. For example, any numeric type can be returned as anyNumbertype, and dates, locales, characters, and booleans can be returned as strings.- Author:
- Abe White
- See Also:
ResultSetResult
-
-
Constructor Summary
Constructors Constructor Description AbstractResult()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanabsolute(int row)Move to the given 0-based row in the result, or return false if the row does not exist.protected booleanabsoluteInternal(int row)Throws an exception by default.protected ObjectcheckNull(Object val)voidclose()Closes all eager results.protected voidcloseEagerMap(Map eager)Close all results in eager map.booleancontains(Object obj)Return true if the given id or column is available in the result.booleancontains(Column col, Joins joins)Return true if the given column is available in the result.booleancontainsAll(Object[] objs)Return true if all the given ids or columns are available in the result.booleancontainsAll(Column[] cols, Joins joins)Return true if all the given columns are available in the result.protected booleancontainsAllInternal(Object[] objs, Joins joins)Return whether this result contains data for all the given ids or columns.protected abstract booleancontainsInternal(Object obj, Joins joins)Return whether this result contains data for the given id or column.voidendDataRequest()Ends a data request.ArraygetArray(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.ArraygetArray(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.protected ArraygetArrayInternal(Object obj, Joins joins)InputStreamgetAsciiStream(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.InputStreamgetAsciiStream(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.protected InputStreamgetAsciiStreamInternal(Object obj, Joins joins)ClassMappinggetBaseMapping()If this is the result of a UNION used to select a hierarchy of mappings, the base mapping represented by the current row.BigDecimalgetBigDecimal(Object obj)Return the value stored in the given column or id.BigDecimalgetBigDecimal(Column col, Joins joins)Return the value stored in the given column.protected BigDecimalgetBigDecimalInternal(Object obj, Joins joins)BigIntegergetBigInteger(Object obj)Return the value stored in the given column or id.BigIntegergetBigInteger(Column col, Joins joins)Return the value stored in the given column.protected BigIntegergetBigIntegerInternal(Object obj, Joins joins)InputStreamgetBinaryStream(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.InputStreamgetBinaryStream(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.protected InputStreamgetBinaryStreamInternal(Object obj, Joins joins)BlobgetBlob(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.BlobgetBlob(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.protected BlobgetBlobInternal(Object obj, Joins joins)booleangetBoolean(Object obj)Return the value stored in the given column or id.booleangetBoolean(Column col, Joins joins)Return the value stored in the given column.protected booleangetBooleanInternal(Object obj, Joins joins)bytegetByte(Object obj)Return the value stored in the given column or id.bytegetByte(Column col, Joins joins)Return the value stored in the given column.protected bytegetByteInternal(Object obj, Joins joins)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.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.protected byte[]getBytesInternal(Object obj, Joins joins)CalendargetCalendar(Object obj)Return the value stored in the given column or id.CalendargetCalendar(Column col, Joins joins)Return the value stored in the given column.protected CalendargetCalendarInternal(Object obj, Joins joins)chargetChar(Object obj)Return the value stored in the given column or id.chargetChar(Column col, Joins joins)Return the value stored in the given column.ReadergetCharacterStream(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.ReadergetCharacterStream(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.protected ReadergetCharacterStreamInternal(Object obj, Joins joins)protected chargetCharInternal(Object obj, Joins joins)ClobgetClob(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.ClobgetClob(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.protected ClobgetClobInternal(Object obj, Joins joins)DategetDate(Object obj)Return the value stored in the given column or id.DategetDate(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.DategetDate(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.DategetDate(Column col, Joins joins)Return the value stored in the given column.protected DategetDateInternal(Object obj, Calendar cal, Joins joins)protected DategetDateInternal(Object obj, Joins joins)doublegetDouble(Object obj)Return the value stored in the given column or id.doublegetDouble(Column col, Joins joins)Return the value stored in the given column.protected doublegetDoubleInternal(Object obj, Joins joins)ObjectgetEager(FieldMapping key)The eager result for the given key, or null if none.protected MapgetEagerMap(boolean client)Raw eager information.floatgetFloat(Object obj)Return the value stored in the given column or id.floatgetFloat(Column col, Joins joins)Return the value stored in the given column.protected floatgetFloatInternal(Object obj, Joins joins)intgetInt(Object obj)Return the value stored in the given column or id.intgetInt(Column col, Joins joins)Return the value stored in the given column.protected intgetIntInternal(Object obj, Joins joins)InputStreamgetLOBStream(JDBCStore store, Object obj)protected InputStreamgetLOBStreamInternal(JDBCStore store, Object obj, Joins joins)LocalDategetLocalDate(Object obj)Return the value stored in the given column or id.protected LocalDategetLocalDateInternal(Object obj, Joins joins)LocalDateTimegetLocalDateTime(Object obj)Return the value stored in the given column or id.protected LocalDateTimegetLocalDateTimeInternal(Object obj, Joins joins)LocalegetLocale(Object obj)Return the value stored in the given column or id.LocalegetLocale(Column col, Joins joins)Return the value stored in the given column.protected LocalegetLocaleInternal(Object obj, Joins joins)LocalTimegetLocalTime(Object obj)Return the value stored in the given column or id.protected LocalTimegetLocalTimeInternal(Object obj, Joins joins)longgetLong(Object obj)Return the value stored in the given column or id.longgetLong(Column col, Joins joins)Return the value stored in the given column.protected longgetLongInternal(Object obj, Joins joins)FieldMappinggetMappedByFieldMapping()If this is the result used to select a toMany relationship, the mappedByFieldMapping is field mapping representing the inverse relationship.ObjectgetMappedByValue()If this is the result used to select a toMany relationship, the mappedByValue is value of the owner of the toMany relationship.NumbergetNumber(Object obj)Return the value stored in the given column or id.NumbergetNumber(Column col, Joins joins)Return the value stored in the given column.protected NumbergetNumberInternal(Object obj, Joins joins)ObjectgetObject(Object obj, int metaType, Object arg)Return the value stored in the given column or id.ObjectgetObject(Column col, Object arg, Joins joins)Return the value stored in the given column.protected abstract ObjectgetObjectInternal(Object obj, int metaType, Object arg, Joins joins)Return the value stored in the given id or column.OffsetDateTimegetOffsetDateTime(Object obj)Return the value stored in the given column or id.protected OffsetDateTimegetOffsetDateTimeInternal(Object obj, Joins joins)OffsetTimegetOffsetTime(Object obj)Return the value stored in the given column or id.protected OffsetTimegetOffsetTimeInternal(Object obj, Joins joins)RefgetRef(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.RefgetRef(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.protected RefgetRefInternal(Object obj, Map map, Joins joins)shortgetShort(Object obj)Return the value stored in the given column or id.shortgetShort(Column col, Joins joins)Return the value stored in the given column.protected shortgetShortInternal(Object obj, Joins joins)ObjectgetSQLObject(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.ObjectgetSQLObject(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.protected ObjectgetSQLObjectInternal(Object obj, Map map, Joins joins)protected abstract ObjectgetStreamInternal(JDBCStore store, Object obj, int metaType, Object arg, Joins joins)StringgetString(Object obj)Return the value stored in the given column or id.StringgetString(Column col, Joins joins)Return the value stored in the given column.protected StringgetStringInternal(Object obj, Joins joins, boolean isClobString)TimegetTime(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.TimegetTime(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.protected TimegetTimeInternal(Object obj, Calendar cal, Joins joins)TimestampgetTimestamp(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.TimestampgetTimestamp(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.protected TimestampgetTimestampInternal(Object obj, Calendar cal, Joins joins)intindexOf()The index of the select within the UNION that the current row corresponds to, or 0.booleanisLocking()If true, then any results loaded from this Result will be locked in the database.Objectload(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch)Load a pc object using the given store manager.Objectload(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins)Load a pc object using the given store manager.JoinsnewJoins()Returns a no-op joins object by default.booleannext()Advance to the next row, or return false if there are no more rows in the result.protected abstract booleannextInternal()Advance this row.voidpushBack()Push back the last result.voidputEager(FieldMapping key, Object res)The eager result for the given key, or null if none.voidsetBaseMapping(ClassMapping base)If this is the result of a UNION used to select a hierarchy of mappings, the base mapping represented by the current row.protected voidsetEagerMap(Map eager)Raw eager information.voidsetIndexOf(int idx)voidsetLocking(boolean locking)Set to true if row locking has been issued for the row.voidsetMappedByFieldMapping(FieldMapping fieldMapping)If this is the result used to select a toMany relationship, the mappedByFieldMapping is field mapping representing the inverse relationship.voidsetMappedByValue(Object mappedByValue)If this is the result used to select a toMany relationship, the mappedByValue is value of the owner of the toMany relationship.voidstartDataRequest(Object mapping)Informs this receiver about the application element for which a subsequent data request will be made.booleansupportsRandomAccess()Returns false by default.protected Objecttranslate(Object obj, Joins joins)Translate the user-given id or column.booleanwasNull()Return true if the last value fetched was null.
-
-
-
Method Detail
-
getEager
public Object getEager(FieldMapping key)
Description copied from interface:ResultThe eager result for the given key, or null if none.
-
putEager
public void putEager(FieldMapping key, Object res)
Description copied from interface:ResultThe eager result for the given key, or null if none.
-
getEagerMap
protected Map getEagerMap(boolean client)
Raw eager information. May be null.- Parameters:
client- whether the client is accessing eager information
-
setEagerMap
protected void setEagerMap(Map eager)
Raw eager information.
-
close
public void close()
Closes all eager results.
-
closeEagerMap
protected void closeEagerMap(Map eager)
Close all results in eager map.
-
supportsRandomAccess
public boolean supportsRandomAccess() throws SQLExceptionReturns false by default.- Specified by:
supportsRandomAccessin interfaceResult- Throws:
SQLException
-
absolute
public boolean absolute(int row) throws SQLExceptionDescription copied from interface:ResultMove to the given 0-based row in the result, or return false if the row does not exist. This method will only be called if the result supports random access.- Specified by:
absolutein interfaceResult- Throws:
SQLException
-
absoluteInternal
protected boolean absoluteInternal(int row) throws SQLExceptionThrows an exception by default.- Throws:
SQLException
-
next
public boolean next() throws SQLExceptionDescription copied from interface:ResultAdvance to the next row, or return false if there are no more rows in the result.- Specified by:
nextin interfaceResult- Throws:
SQLException
-
nextInternal
protected abstract boolean nextInternal() throws SQLExceptionAdvance this row.- Throws:
SQLException
-
pushBack
public void pushBack() throws SQLExceptionDescription copied from interface:ResultPush back the last result. In other words, just ignore the next call toResult.next(). After the first time this method is called, additional calls before a call toResult.next()orResult.absolute(int)should have no further affect.- Specified by:
pushBackin interfaceResult- Throws:
SQLException
-
newJoins
public Joins newJoins()
Returns a no-op joins object by default.
-
contains
public boolean contains(Object obj) throws SQLException
Description copied from interface:ResultReturn true if the given id or column is available in the result.- Specified by:
containsin interfaceResult- Throws:
SQLException
-
containsAll
public boolean containsAll(Object[] objs) throws SQLException
Description copied from interface:ResultReturn true if all the given ids or columns are available in the result.- Specified by:
containsAllin interfaceResult- Throws:
SQLException
-
contains
public boolean contains(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn true if the given column is available in the result.- Specified by:
containsin interfaceResult- Throws:
SQLException
-
containsAll
public boolean containsAll(Column[] cols, Joins joins) throws SQLException
Description copied from interface:ResultReturn true if all the given columns are available in the result.- Specified by:
containsAllin interfaceResult- Throws:
SQLException
-
containsInternal
protected abstract boolean containsInternal(Object obj, Joins joins) throws SQLException
Return whether this result contains data for the given id or column. The id or column has not beed passed throughtranslate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins).- Throws:
SQLException
-
containsAllInternal
protected boolean containsAllInternal(Object[] objs, Joins joins) throws SQLException
Return whether this result contains data for all the given ids or columns. The ids or columns have not been passed throughtranslate(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins). Delegates tocontainsInternal(java.lang.Object, org.apache.openjpa.jdbc.sql.Joins)by default.- Throws:
SQLException
-
getBaseMapping
public ClassMapping getBaseMapping()
Description copied from interface:ResultIf this is the result of a UNION used to select a hierarchy of mappings, the base mapping represented by the current row. This information is not available after getting any eager results from the row.- Specified by:
getBaseMappingin interfaceResult
-
setBaseMapping
public void setBaseMapping(ClassMapping base)
Description copied from interface:ResultIf this is the result of a UNION used to select a hierarchy of mappings, the base mapping represented by the current row. This information is not available after getting any eager results from the row.- Specified by:
setBaseMappingin interfaceResult
-
getMappedByFieldMapping
public FieldMapping getMappedByFieldMapping()
Description copied from interface:ResultIf this is the result used to select a toMany relationship, the mappedByFieldMapping is field mapping representing the inverse relationship. This is to avoid unneeded extra sql to retrieve the eager inverse field.- Specified by:
getMappedByFieldMappingin interfaceResult
-
setMappedByFieldMapping
public void setMappedByFieldMapping(FieldMapping fieldMapping)
Description copied from interface:ResultIf this is the result used to select a toMany relationship, the mappedByFieldMapping is field mapping representing the inverse relationship. This is to avoid unneeded extra sql to retrieve the eager inverse field.- Specified by:
setMappedByFieldMappingin interfaceResult
-
getMappedByValue
public Object getMappedByValue()
Description copied from interface:ResultIf this is the result used to select a toMany relationship, the mappedByValue is value of the owner of the toMany relationship. This is to avoid unneeded extra sql to retrieve the eager inverse field.- Specified by:
getMappedByValuein interfaceResult
-
setMappedByValue
public void setMappedByValue(Object mappedByValue)
Description copied from interface:ResultIf this is the result used to select a toMany relationship, the mappedByValue is value of the owner of the toMany relationship. This is to avoid unneeded extra sql to retrieve the eager inverse field.- Specified by:
setMappedByValuein interfaceResult
-
indexOf
public int indexOf()
Description copied from interface:ResultThe index of the select within the UNION that the current row corresponds to, or 0.
-
setIndexOf
public void setIndexOf(int idx)
-
load
public Object load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch) throws SQLException
Description copied from interface:ResultLoad a pc object using the given store manager.- Specified by:
loadin interfaceResult- Throws:
SQLException
-
load
public Object load(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins) throws SQLException
Description copied from interface:ResultLoad a pc object using the given store manager.- Specified by:
loadin interfaceResult- Throws:
SQLException
-
getArray
public Array getArray(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getArrayin interfaceResult- Throws:
SQLException
-
getArray
public Array getArray(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getArrayin interfaceResult- Throws:
SQLException
-
getArrayInternal
protected Array getArrayInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getAsciiStream
public InputStream getAsciiStream(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getAsciiStreamin interfaceResult- Throws:
SQLException
-
getAsciiStream
public InputStream getAsciiStream(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getAsciiStreamin interfaceResult- Throws:
SQLException
-
getAsciiStreamInternal
protected InputStream getAsciiStreamInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getBigDecimalin interfaceResult- Throws:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getBigDecimalin interfaceResult- Throws:
SQLException
-
getBigDecimalInternal
protected BigDecimal getBigDecimalInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBigInteger
public BigInteger getBigInteger(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getBigIntegerin interfaceResult- Throws:
SQLException
-
getBigInteger
public BigInteger getBigInteger(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getBigIntegerin interfaceResult- Throws:
SQLException
-
getBigIntegerInternal
protected BigInteger getBigIntegerInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBinaryStreamin interfaceResult- Throws:
SQLException
-
getBinaryStream
public InputStream getBinaryStream(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBinaryStreamin interfaceResult- Throws:
SQLException
-
getLOBStream
public InputStream getLOBStream(JDBCStore store, Object obj) throws SQLException
- Specified by:
getLOBStreamin interfaceResult- Throws:
SQLException
-
getBinaryStreamInternal
protected InputStream getBinaryStreamInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLOBStreamInternal
protected InputStream getLOBStreamInternal(JDBCStore store, Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBlob
public Blob getBlob(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBlobin interfaceResult- Throws:
SQLException
-
getBlob
public Blob getBlob(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBlobin interfaceResult- Throws:
SQLException
-
getBlobInternal
protected Blob getBlobInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBoolean
public boolean getBoolean(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getBooleanin interfaceResult- Throws:
SQLException
-
getBoolean
public boolean getBoolean(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getBooleanin interfaceResult- Throws:
SQLException
-
getBooleanInternal
protected boolean getBooleanInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getByte
public byte getByte(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getBytein interfaceResult- Throws:
SQLException
-
getByte
public byte getByte(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getBytein interfaceResult- Throws:
SQLException
-
getByteInternal
protected byte getByteInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getBytes
public byte[] getBytes(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBytesin interfaceResult- Throws:
SQLException
-
getBytes
public byte[] getBytes(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getBytesin interfaceResult- Throws:
SQLException
-
getBytesInternal
protected byte[] getBytesInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getCalendar
public Calendar getCalendar(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getCalendarin interfaceResult- Throws:
SQLException
-
getCalendar
public Calendar getCalendar(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getCalendarin interfaceResult- Throws:
SQLException
-
getCalendarInternal
protected Calendar getCalendarInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLocalDate
public LocalDate getLocalDate(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getLocalDatein interfaceResult- Throws:
SQLException
-
getLocalDateInternal
protected LocalDate getLocalDateInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLocalTime
public LocalTime getLocalTime(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getLocalTimein interfaceResult- Throws:
SQLException
-
getLocalTimeInternal
protected LocalTime getLocalTimeInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLocalDateTime
public LocalDateTime getLocalDateTime(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getLocalDateTimein interfaceResult- Throws:
SQLException
-
getLocalDateTimeInternal
protected LocalDateTime getLocalDateTimeInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getOffsetTime
public OffsetTime getOffsetTime(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getOffsetTimein interfaceResult- Throws:
SQLException
-
getOffsetTimeInternal
protected OffsetTime getOffsetTimeInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getOffsetDateTime
public OffsetDateTime getOffsetDateTime(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getOffsetDateTimein interfaceResult- Throws:
SQLException
-
getOffsetDateTimeInternal
protected OffsetDateTime getOffsetDateTimeInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getChar
public char getChar(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getCharin interfaceResult- Throws:
SQLException
-
getChar
public char getChar(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getCharin interfaceResult- Throws:
SQLException
-
getCharInternal
protected char getCharInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getCharacterStreamin interfaceResult- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getCharacterStreamin interfaceResult- Throws:
SQLException
-
getCharacterStreamInternal
protected Reader getCharacterStreamInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getClob
public Clob getClob(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getClobin interfaceResult- Throws:
SQLException
-
getClob
public Clob getClob(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getClobin interfaceResult- Throws:
SQLException
-
getClobInternal
protected Clob getClobInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getDate
public Date getDate(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getDatein interfaceResult- Throws:
SQLException
-
getDate
public Date getDate(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getDatein interfaceResult- Throws:
SQLException
-
getDateInternal
protected Date getDateInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getDate
public Date getDate(Object obj, Calendar cal) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getDatein interfaceResult- Throws:
SQLException
-
getDate
public Date getDate(Column col, Calendar cal, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getDatein interfaceResult- Throws:
SQLException
-
getDateInternal
protected Date getDateInternal(Object obj, Calendar cal, Joins joins) throws SQLException
- Throws:
SQLException
-
getDouble
public double getDouble(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getDoublein interfaceResult- Throws:
SQLException
-
getDouble
public double getDouble(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getDoublein interfaceResult- Throws:
SQLException
-
getDoubleInternal
protected double getDoubleInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getFloat
public float getFloat(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getFloatin interfaceResult- Throws:
SQLException
-
getFloat
public float getFloat(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getFloatin interfaceResult- Throws:
SQLException
-
getFloatInternal
protected float getFloatInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getInt
public int getInt(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getIntin interfaceResult- Throws:
SQLException
-
getInt
public int getInt(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getIntin interfaceResult- Throws:
SQLException
-
getIntInternal
protected int getIntInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLocale
public Locale getLocale(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getLocalein interfaceResult- Throws:
SQLException
-
getLocale
public Locale getLocale(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getLocalein interfaceResult- Throws:
SQLException
-
getLocaleInternal
protected Locale getLocaleInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getLong
public long getLong(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getLongin interfaceResult- Throws:
SQLException
-
getLong
public long getLong(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getLongin interfaceResult- Throws:
SQLException
-
getLongInternal
protected long getLongInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getNumber
public Number getNumber(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getNumberin interfaceResult- Throws:
SQLException
-
getNumber
public Number getNumber(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getNumberin interfaceResult- Throws:
SQLException
-
getNumberInternal
protected Number getNumberInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getObject
public Object getObject(Object obj, int metaType, Object arg) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getObjectin interfaceResult- Parameters:
obj- the column or id whose data to fetchmetaType- the type code fromJavaTypesorJavaSQLTypesfor the type of the data; ifobjis a column, you may specify -1 to use the column's recorded java typearg- some JDBC data access methods use an argument, such as aCalendarorMap- Throws:
SQLException
-
getObject
public Object getObject(Column col, Object arg, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getObjectin interfaceResult- Parameters:
col- the column whose data to fetcharg- some JDBC data access methods use an argument, such as aCalendarorMap- Throws:
SQLException
-
getObjectInternal
protected abstract Object getObjectInternal(Object obj, int metaType, Object arg, Joins joins) throws SQLException
Return the value stored in the given id or column.- Throws:
SQLException
-
getStreamInternal
protected abstract Object getStreamInternal(JDBCStore store, Object obj, int metaType, Object arg, Joins joins) throws SQLException
- Throws:
SQLException
-
getSQLObject
public Object getSQLObject(Object obj, Map map) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getSQLObjectin interfaceResult- Throws:
SQLException
-
getSQLObject
public Object getSQLObject(Column col, Map map, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getSQLObjectin interfaceResult- Throws:
SQLException
-
getSQLObjectInternal
protected Object getSQLObjectInternal(Object obj, Map map, Joins joins) throws SQLException
- Throws:
SQLException
-
getRef
public Ref getRef(Object obj, Map map) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getRefin interfaceResult- Throws:
SQLException
-
getRef
public Ref getRef(Column col, Map map, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getRefin interfaceResult- Throws:
SQLException
-
getRefInternal
protected Ref getRefInternal(Object obj, Map map, Joins joins) throws SQLException
- Throws:
SQLException
-
getShort
public short getShort(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getShortin interfaceResult- Throws:
SQLException
-
getShort
public short getShort(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getShortin interfaceResult- Throws:
SQLException
-
getShortInternal
protected short getShortInternal(Object obj, Joins joins) throws SQLException
- Throws:
SQLException
-
getString
public String getString(Object obj) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id.- Specified by:
getStringin interfaceResult- Throws:
SQLException
-
getString
public String getString(Column col, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column.- Specified by:
getStringin interfaceResult- Throws:
SQLException
-
getStringInternal
protected String getStringInternal(Object obj, Joins joins, boolean isClobString) throws SQLException
- Throws:
SQLException
-
getTime
public Time getTime(Object obj, Calendar cal) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getTimein interfaceResult- Throws:
SQLException
-
getTime
public Time getTime(Column col, Calendar cal, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getTimein interfaceResult- Throws:
SQLException
-
getTimeInternal
protected Time getTimeInternal(Object obj, Calendar cal, Joins joins) throws SQLException
- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(Object obj, Calendar cal) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.- Specified by:
getTimestampin interfaceResult- Throws:
SQLException
-
getTimestamp
public Timestamp getTimestamp(Column col, Calendar cal, Joins joins) throws SQLException
Description copied from interface:ResultReturn the value stored in the given column; may not be supported by results that are not backed by a SQL result set.- Specified by:
getTimestampin interfaceResult- Throws:
SQLException
-
getTimestampInternal
protected Timestamp getTimestampInternal(Object obj, Calendar cal, Joins joins) throws SQLException
- Throws:
SQLException
-
wasNull
public boolean wasNull() throws SQLExceptionDescription copied from interface:ResultReturn true if the last value fetched was null.- Specified by:
wasNullin interfaceResult- Throws:
SQLException
-
setLocking
public void setLocking(boolean locking)
Description copied from interface:ResultSet to true if row locking has been issued for the row.- Specified by:
setLockingin interfaceResult
-
isLocking
public boolean isLocking()
Description copied from interface:ResultIf true, then any results loaded from this Result will be locked in the database.
-
startDataRequest
public void startDataRequest(Object mapping)
Description copied from interface:ResultInforms this receiver about the application element for which a subsequent data request will be made.- Specified by:
startDataRequestin interfaceResult
-
endDataRequest
public void endDataRequest()
Description copied from interface:ResultEnds a data request. Must be called in conjunction withResult.startDataRequest(java.lang.Object). The calls can be nested as follws
startDataRequest (relation); startDataRequest (relationsField); getObject("COLUMN_Y"); endDataRequest (); endDataRequest ();- Specified by:
endDataRequestin interfaceResult
-
translate
protected Object translate(Object obj, Joins joins) throws SQLException
Translate the user-given id or column. This method is called before delegating to anyget*Internalmethods with the exception ofgetObjectInternal. Return the original value by default.- Throws:
SQLException
-
-