Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.jdbc » sql » [javadoc | source]
org.apache.openjpa.jdbc.sql
abstract public class: AbstractResult [javadoc | source]
java.lang.Object
   org.apache.openjpa.jdbc.sql.AbstractResult

All Implemented Interfaces:
    Result

Direct Known Subclasses:
    MappingResult, SelectResult, ResultSetResult

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 , 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.
Method from org.apache.openjpa.jdbc.sql.AbstractResult Summary:
absolute,   absoluteInternal,   checkNull,   close,   closeEagerMap,   contains,   contains,   containsAll,   containsAll,   containsAllInternal,   containsInternal,   endDataRequest,   getArray,   getArray,   getArrayInternal,   getAsciiStream,   getAsciiStream,   getAsciiStreamInternal,   getBaseMapping,   getBigDecimal,   getBigDecimal,   getBigDecimalInternal,   getBigInteger,   getBigInteger,   getBigIntegerInternal,   getBinaryStream,   getBinaryStream,   getBinaryStreamInternal,   getBlob,   getBlob,   getBlobInternal,   getBoolean,   getBoolean,   getBooleanInternal,   getByte,   getByte,   getByteInternal,   getBytes,   getBytes,   getBytesInternal,   getCalendar,   getCalendar,   getCalendarInternal,   getChar,   getChar,   getCharInternal,   getCharacterStream,   getCharacterStream,   getCharacterStreamInternal,   getClob,   getClob,   getClobInternal,   getDate,   getDate,   getDate,   getDate,   getDateInternal,   getDateInternal,   getDouble,   getDouble,   getDoubleInternal,   getEager,   getEagerMap,   getFloat,   getFloat,   getFloatInternal,   getInt,   getInt,   getIntInternal,   getLOBStream,   getLOBStreamInternal,   getLocale,   getLocale,   getLocaleInternal,   getLong,   getLong,   getLongInternal,   getNumber,   getNumber,   getNumberInternal,   getObject,   getObject,   getObjectInternal,   getRef,   getRef,   getRefInternal,   getSQLObject,   getSQLObject,   getSQLObjectInternal,   getShort,   getShort,   getShortInternal,   getStreamInternal,   getString,   getString,   getStringInternal,   getTime,   getTime,   getTimeInternal,   getTimestamp,   getTimestamp,   getTimestampInternal,   indexOf,   isLocking,   load,   load,   newJoins,   next,   nextInternal,   pushBack,   putEager,   setBaseMapping,   setEagerMap,   setIndexOf,   setLocking,   startDataRequest,   supportsRandomAccess,   translate,   wasNull
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.jdbc.sql.AbstractResult Detail:
 public boolean absolute(int row) throws SQLException 
 protected boolean absoluteInternal(int row) throws SQLException 
    Throws an exception by default.
 protected Object checkNull(Object val) 
 public  void close() 
    Closes all eager results.
 protected  void closeEagerMap(Map eager) 
    Close all results in eager map.
 public boolean contains(Object obj) throws SQLException 
 public boolean contains(Column col,
    Joins joins) throws SQLException 
 public boolean containsAll(Object[] objs) throws SQLException 
 public boolean containsAll(Column[] cols,
    Joins joins) throws SQLException 
 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 through #translate . Delegates to #containsInternal by default.
 abstract protected 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 through #translate .
 public  void endDataRequest() 
 public Array getArray(Object obj) throws SQLException 
 public Array getArray(Column col,
    Joins joins) throws SQLException 
 protected Array getArrayInternal(Object obj,
    Joins joins) throws SQLException 
 public InputStream getAsciiStream(Object obj) throws SQLException 
 public InputStream getAsciiStream(Column col,
    Joins joins) throws SQLException 
 protected InputStream getAsciiStreamInternal(Object obj,
    Joins joins) throws SQLException 
 public ClassMapping getBaseMapping() 
 public BigDecimal getBigDecimal(Object obj) throws SQLException 
 public BigDecimal getBigDecimal(Column col,
    Joins joins) throws SQLException 
 protected BigDecimal getBigDecimalInternal(Object obj,
    Joins joins) throws SQLException 
 public BigInteger getBigInteger(Object obj) throws SQLException 
 public BigInteger getBigInteger(Column col,
    Joins joins) throws SQLException 
 protected BigInteger getBigIntegerInternal(Object obj,
    Joins joins) throws SQLException 
 public InputStream getBinaryStream(Object obj) throws SQLException 
 public InputStream getBinaryStream(Column col,
    Joins joins) throws SQLException 
 protected InputStream getBinaryStreamInternal(Object obj,
    Joins joins) throws SQLException 
 public Blob getBlob(Object obj) throws SQLException 
 public Blob getBlob(Column col,
    Joins joins) throws SQLException 
 protected Blob getBlobInternal(Object obj,
    Joins joins) throws SQLException 
 public boolean getBoolean(Object obj) throws SQLException 
 public boolean getBoolean(Column col,
    Joins joins) throws SQLException 
 protected boolean getBooleanInternal(Object obj,
    Joins joins) throws SQLException 
 public byte getByte(Object obj) throws SQLException 
 public byte getByte(Column col,
    Joins joins) throws SQLException 
 protected byte getByteInternal(Object obj,
    Joins joins) throws SQLException 
 public byte[] getBytes(Object obj) throws SQLException 
 public byte[] getBytes(Column col,
    Joins joins) throws SQLException 
 protected byte[] getBytesInternal(Object obj,
    Joins joins) throws SQLException 
 public Calendar getCalendar(Object obj) throws SQLException 
 public Calendar getCalendar(Column col,
    Joins joins) throws SQLException 
 protected Calendar getCalendarInternal(Object obj,
    Joins joins) throws SQLException 
 public char getChar(Object obj) throws SQLException 
 public char getChar(Column col,
    Joins joins) throws SQLException 
 protected char getCharInternal(Object obj,
    Joins joins) throws SQLException 
 public Reader getCharacterStream(Object obj) throws SQLException 
 public Reader getCharacterStream(Column col,
    Joins joins) throws SQLException 
 protected Reader getCharacterStreamInternal(Object obj,
    Joins joins) throws SQLException 
 public Clob getClob(Object obj) throws SQLException 
 public Clob getClob(Column col,
    Joins joins) throws SQLException 
 protected Clob getClobInternal(Object obj,
    Joins joins) throws SQLException 
 public Date getDate(Object obj) throws SQLException 
 public Date getDate(Column col,
    Joins joins) throws SQLException 
 public Date getDate(Object obj,
    Calendar cal) throws SQLException 
 public Date getDate(Column col,
    Calendar cal,
    Joins joins) throws SQLException 
 protected Date getDateInternal(Object obj,
    Joins joins) throws SQLException 
 protected Date getDateInternal(Object obj,
    Calendar cal,
    Joins joins) throws SQLException 
 public double getDouble(Object obj) throws SQLException 
 public double getDouble(Column col,
    Joins joins) throws SQLException 
 protected double getDoubleInternal(Object obj,
    Joins joins) throws SQLException 
 public Object getEager(FieldMapping key) 
 protected Map getEagerMap(boolean client) 
    Raw eager information. May be null.
 public float getFloat(Object obj) throws SQLException 
 public float getFloat(Column col,
    Joins joins) throws SQLException 
 protected float getFloatInternal(Object obj,
    Joins joins) throws SQLException 
 public int getInt(Object obj) throws SQLException 
 public int getInt(Column col,
    Joins joins) throws SQLException 
 protected int getIntInternal(Object obj,
    Joins joins) throws SQLException 
 public InputStream getLOBStream(JDBCStore store,
    Object obj) throws SQLException 
 protected InputStream getLOBStreamInternal(JDBCStore store,
    Object obj,
    Joins joins) throws SQLException 
 public Locale getLocale(Object obj) throws SQLException 
 public Locale getLocale(Column col,
    Joins joins) throws SQLException 
 protected Locale getLocaleInternal(Object obj,
    Joins joins) throws SQLException 
 public long getLong(Object obj) throws SQLException 
 public long getLong(Column col,
    Joins joins) throws SQLException 
 protected long getLongInternal(Object obj,
    Joins joins) throws SQLException 
 public Number getNumber(Object obj) throws SQLException 
 public Number getNumber(Column col,
    Joins joins) throws SQLException 
 protected Number getNumberInternal(Object obj,
    Joins joins) throws SQLException 
 public Object getObject(Object obj,
    int metaType,
    Object arg) throws SQLException 
 public Object getObject(Column col,
    Object arg,
    Joins joins) throws SQLException 
 abstract protected Object getObjectInternal(Object obj,
    int metaType,
    Object arg,
    Joins joins) throws SQLException
    Return the value stored in the given id or column.
 public Ref getRef(Object obj,
    Map map) throws SQLException 
 public Ref getRef(Column col,
    Map map,
    Joins joins) throws SQLException 
 protected Ref getRefInternal(Object obj,
    Map map,
    Joins joins) throws SQLException 
 public Object getSQLObject(Object obj,
    Map map) throws SQLException 
 public Object getSQLObject(Column col,
    Map map,
    Joins joins) throws SQLException 
 protected Object getSQLObjectInternal(Object obj,
    Map map,
    Joins joins) throws SQLException 
 public short getShort(Object obj) throws SQLException 
 public short getShort(Column col,
    Joins joins) throws SQLException 
 protected short getShortInternal(Object obj,
    Joins joins) throws SQLException 
 abstract protected Object getStreamInternal(JDBCStore store,
    Object obj,
    int metaType,
    Object arg,
    Joins joins) throws SQLException
 public String getString(Object obj) throws SQLException 
 public String getString(Column col,
    Joins joins) throws SQLException 
 protected String getStringInternal(Object obj,
    Joins joins) throws SQLException 
 public Time getTime(Object obj,
    Calendar cal) throws SQLException 
 public Time getTime(Column col,
    Calendar cal,
    Joins joins) throws SQLException 
 protected Time getTimeInternal(Object obj,
    Calendar cal,
    Joins joins) throws SQLException 
 public Timestamp getTimestamp(Object obj,
    Calendar cal) throws SQLException 
 public Timestamp getTimestamp(Column col,
    Calendar cal,
    Joins joins) throws SQLException 
 protected Timestamp getTimestampInternal(Object obj,
    Calendar cal,
    Joins joins) throws SQLException 
 public int indexOf() 
 public boolean isLocking() 
 public Object load(ClassMapping mapping,
    JDBCStore store,
    JDBCFetchConfiguration fetch) throws SQLException 
 public Object load(ClassMapping mapping,
    JDBCStore store,
    JDBCFetchConfiguration fetch,
    Joins joins) throws SQLException 
 public Joins newJoins() 
    Returns a no-op joins object by default.
 public boolean next() throws SQLException 
 abstract protected boolean nextInternal() throws SQLException
    Advance this row.
 public  void pushBack() throws SQLException 
 public  void putEager(FieldMapping key,
    Object res) 
 public  void setBaseMapping(ClassMapping base) 
 protected  void setEagerMap(Map eager) 
    Raw eager information.
 public  void setIndexOf(int idx) 
 public  void setLocking(boolean locking) 
 public  void startDataRequest(Object mapping) 
 public boolean supportsRandomAccess() throws SQLException 
    Returns false by default.
 protected Object translate(Object obj,
    Joins joins) throws SQLException 
    Translate the user-given id or column. This method is called before delegating to any get*Internal methods. Return the original value by default.
 public boolean wasNull() throws SQLException