com.sap.mw.jco.jra
Interface ResultMap

All Superinterfaces:
java.lang.Cloneable, java.util.Map, javax.resource.cci.MappedRecord, javax.resource.cci.Record, java.io.Serializable

public interface ResultMap
extends javax.resource.cci.MappedRecord

Extension of the java.util.Map such that it has the same getters and setters like java.sql.ResultSet. This interface adds new features to the javax.resource.cci.MappedRecord. You can use ResultMap instead of MappedRecord, but you are not required to do it.


Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
 int findColumn(java.lang.String fieldName)
          Maps the given ResultMap column name to its ResultMap column index.
 java.sql.Array getArray(java.lang.String fieldName)
          Not implemented
 java.io.InputStream getAsciiStream(java.lang.String fieldName)
          Not supported.
 java.math.BigDecimal getBigDecimal(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a java.math.BigDecimal with full precision.
 java.io.InputStream getBinaryStream(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a stream of uninterpreted bytes.
 java.sql.Blob getBlob(java.lang.String fieldName)
          Returns the value of the designated field of this ResultMap object as a Blob object in the Java programming language.
 boolean getBoolean(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a boolean in the Java programming language.
 byte getByte(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a byte in the Java programming language.
 byte[] getBytes(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a byte array in the Java programming language.
 java.io.Reader getCharacterStream(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a java.io.Reader object.
 java.sql.Clob getClob(java.lang.String fieldName)
          Returns the value of the designated field of this ResultMap object as a Clob object in the Java programming language.
 java.sql.Date getDate(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a java.sql.Date object in the Java programming language.
 java.sql.Date getDate(java.lang.String fieldName, java.util.Calendar cal)
          Returns the value of the designated field of this ResultMap object as a java.sql.Date object in the Java programming language.
 double getDouble(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a double in the Java programming language.
 float getFloat(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a float in the Java programming language.
 int getInt(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as an int in the Java programming language.
 long getLong(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a long in the Java programming language.
 java.lang.Object getObject(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as an Object in the Java programming language.
 java.lang.Object getObject(java.lang.String colName, java.util.Map map)
          Returns the value of the designated field of this ResultMap object as an Object in the Java programming language.
 java.sql.Ref getRef(java.lang.String fieldName)
          Returns the value of the designated field of this ResultMap object as a Ref object in the Java programming language.
 short getShort(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a short in the Java programming language.
 java.lang.String getString(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a String in the Java programming language.
 java.sql.Time getTime(java.lang.String fieldName)
          Gets the value of the designated field of this ResultMap object as a java.sql.Time object in the Java programming language.
 java.sql.Time getTime(java.lang.String fieldName, java.util.Calendar cal)
          Returns the value of the designated field of this ResultMap object as a java.sql.Time object in the Java programming language.
 java.sql.Timestamp getTimestamp(java.lang.String fieldName)
          Not supported.
 java.sql.Timestamp getTimestamp(java.lang.String fieldName, java.util.Calendar cal)
          Not supported.
 void updateAsciiStream(java.lang.String fieldName, java.io.InputStream x, int length)
          Updates the designated field with an ascii stream value.
 void updateBigDecimal(java.lang.String fieldName, java.math.BigDecimal x)
          Updates the designated field with a java.sql.BigDecimal value.
 void updateBinaryStream(java.lang.String fieldName, java.io.InputStream x, int length)
          Updates the designated field with a binary stream value.
 void updateBoolean(java.lang.String fieldName, boolean x)
          Updates the designated field with a boolean value.
 void updateByte(java.lang.String fieldName, byte x)
          Updates the designated field with a byte value.
 void updateBytes(java.lang.String fieldName, byte[] x)
          Updates the designated field with a boolean value.
 void updateCharacterStream(java.lang.String fieldName, java.io.Reader reader, int length)
          Updates the designated field with a character stream value.
 void updateDate(java.lang.String fieldName, java.sql.Date x)
          Updates the designated field with a java.sql.Date value.
 void updateDouble(java.lang.String fieldName, double x)
          Updates the designated field with a double value.
 void updateFloat(java.lang.String fieldName, float x)
          Updates the designated field with a float value.
 void updateInt(java.lang.String fieldName, int x)
          Updates the designated field with an int value.
 void updateLong(java.lang.String fieldName, long x)
          Updates the designated field with a long value.
 void updateNull(java.lang.String fieldName)
          Updates the designated field with a null value.
 void updateObject(java.lang.String fieldName, java.lang.Object x)
          Updates the designated field with an Object value.
 void updateShort(java.lang.String fieldName, short x)
          Updates the designated field with a short value.
 void updateString(java.lang.String fieldName, java.lang.String x)
          Updates the designated field with a String value.
 void updateTime(java.lang.String fieldName, java.sql.Time x)
          Updates the designated field with a java.sql.Time value.
 void updateTimestamp(java.lang.String fieldName, java.sql.Timestamp x)
          Not supported.
 
Methods inherited from interface javax.resource.cci.Record
clone, equals, getRecordName, getRecordShortDescription, hashCode, setRecordName, setRecordShortDescription
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getString

public java.lang.String getString(java.lang.String fieldName)
                           throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a String in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - if an error occurs

getBoolean

public boolean getBoolean(java.lang.String fieldName)
                   throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a boolean in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is false
Throws:
java.sql.SQLException - if an error occurs

getByte

public byte getByte(java.lang.String fieldName)
             throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a byte in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getShort

public short getShort(java.lang.String fieldName)
               throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a short in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getInt

public int getInt(java.lang.String fieldName)
           throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as an int in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getLong

public long getLong(java.lang.String fieldName)
             throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a long in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getFloat

public float getFloat(java.lang.String fieldName)
               throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a float in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getDouble

public double getDouble(java.lang.String fieldName)
                 throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a double in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is 0
Throws:
java.sql.SQLException - if an error occurs

getBytes

public byte[] getBytes(java.lang.String fieldName)
                throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - if an error occurs

getDate

public java.sql.Date getDate(java.lang.String fieldName)
                      throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a java.sql.Date object in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - if an error occurs

getTime

public java.sql.Time getTime(java.lang.String fieldName)
                      throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a java.sql.Time object in the Java programming language.
Parameters:
fieldName - the name of the field
Returns:
the field's value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException - if an error occurs

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String fieldName)
                                throws java.sql.SQLException
Not supported.
Throws:
UnsupportedOperationException -  

getAsciiStream

public java.io.InputStream getAsciiStream(java.lang.String fieldName)
                                   throws java.sql.SQLException
Not supported.
Throws:
UnsupportedOperationException -  

getBinaryStream

public java.io.InputStream getBinaryStream(java.lang.String fieldName)
                                    throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getXXX method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.

Parameters:
fieldName - the name of the field
Returns:
a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the result is null
Throws:
java.sql.SQLException - if an error occurs

getObject

public java.lang.Object getObject(java.lang.String fieldName)
                           throws java.sql.SQLException

Gets the value of the designated field of this ResultMap object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.

This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
fieldName - the name of the field
Returns:
a java.lang.Object holding the field's value
Throws:
java.sql.SQLException - if an error occurs

findColumn

public int findColumn(java.lang.String fieldName)
               throws java.sql.SQLException
Maps the given ResultMap column name to its ResultMap column index.
Parameters:
fieldName - the name of the column
Returns:
the column index of the given column name
Throws:
java.sql.SQLException - if an error occurs

getCharacterStream

public java.io.Reader getCharacterStream(java.lang.String fieldName)
                                  throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a java.io.Reader object.
Parameters:
fieldName - the name of the column
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.

getBigDecimal

public java.math.BigDecimal getBigDecimal(java.lang.String fieldName)
                                   throws java.sql.SQLException
Gets the value of the designated field of this ResultMap object as a java.math.BigDecimal with full precision.
Parameters:
fieldName - the column name
Returns:
the field's value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
java.sql.SQLException - if an error occurs

updateNull

public void updateNull(java.lang.String fieldName)
                throws java.sql.SQLException
Updates the designated field with a null value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
Throws:
java.sql.SQLException - if an error occurs

updateBoolean

public void updateBoolean(java.lang.String fieldName,
                          boolean x)
                   throws java.sql.SQLException
Updates the designated field with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateByte

public void updateByte(java.lang.String fieldName,
                       byte x)
                throws java.sql.SQLException
Updates the designated field with a byte value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateShort

public void updateShort(java.lang.String fieldName,
                        short x)
                 throws java.sql.SQLException
Updates the designated field with a short value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateInt

public void updateInt(java.lang.String fieldName,
                      int x)
               throws java.sql.SQLException
Updates the designated field with an int value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateLong

public void updateLong(java.lang.String fieldName,
                       long x)
                throws java.sql.SQLException
Updates the designated field with a long value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateFloat

public void updateFloat(java.lang.String fieldName,
                        float x)
                 throws java.sql.SQLException
Updates the designated field with a float value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateDouble

public void updateDouble(java.lang.String fieldName,
                         double x)
                  throws java.sql.SQLException
Updates the designated field with a double value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateBigDecimal

public void updateBigDecimal(java.lang.String fieldName,
                             java.math.BigDecimal x)
                      throws java.sql.SQLException
Updates the designated field with a java.sql.BigDecimal value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateString

public void updateString(java.lang.String fieldName,
                         java.lang.String x)
                  throws java.sql.SQLException
Updates the designated field with a String value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateBytes

public void updateBytes(java.lang.String fieldName,
                        byte[] x)
                 throws java.sql.SQLException
Updates the designated field with a boolean value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. Updates a column with a byte array value. The updateXXX methods are used to update column values in the current row, or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateDate

public void updateDate(java.lang.String fieldName,
                       java.sql.Date x)
                throws java.sql.SQLException
Updates the designated field with a java.sql.Date value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateTime

public void updateTime(java.lang.String fieldName,
                       java.sql.Time x)
                throws java.sql.SQLException
Updates the designated field with a java.sql.Time value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

updateTimestamp

public void updateTimestamp(java.lang.String fieldName,
                            java.sql.Timestamp x)
                     throws java.sql.SQLException
Not supported.
Throws:
UnsupportedOperationException -  

updateAsciiStream

public void updateAsciiStream(java.lang.String fieldName,
                              java.io.InputStream x,
                              int length)
                       throws java.sql.SQLException
Updates the designated field with an ascii stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
length - the length of the stream
Throws:
java.sql.SQLException - if an error occurs

updateBinaryStream

public void updateBinaryStream(java.lang.String fieldName,
                               java.io.InputStream x,
                               int length)
                        throws java.sql.SQLException
Updates the designated field with a binary stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
length - the length of the stream
Throws:
java.sql.SQLException - if an error occurs

updateCharacterStream

public void updateCharacterStream(java.lang.String fieldName,
                                  java.io.Reader reader,
                                  int length)
                           throws java.sql.SQLException
Updates the designated field with a character stream value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
reader - the Reader
length - the length of the stream
Throws:
java.sql.SQLException - if an error occurs

updateObject

public void updateObject(java.lang.String fieldName,
                         java.lang.Object x)
                  throws java.sql.SQLException
Updates the designated field with an Object value. The updateXXX methods are used to update column values in the current row or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database.
Parameters:
fieldName - the name of the column
x - the new column value
Throws:
java.sql.SQLException - if an error occurs

getObject

public java.lang.Object getObject(java.lang.String colName,
                                  java.util.Map map)
                           throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as an Object in the Java programming language. This method uses the specified Map object for custom mapping if appropriate.
Parameters:
colName - the name of the column from which to retrieve the value
map - a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language
Returns:
an Object representing the SQL value in the specified column

getRef

public java.sql.Ref getRef(java.lang.String fieldName)
                    throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as a Ref object in the Java programming language.
Parameters:
fieldName - the column name
Returns:
a Ref object representing the SQL REF value in the specified column

getBlob

public java.sql.Blob getBlob(java.lang.String fieldName)
                      throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as a Blob object in the Java programming language.
Parameters:
fieldName - the name of the column from which to retrieve the value
Returns:
a Blob object representing the BLOB value in the specified column

getClob

public java.sql.Clob getClob(java.lang.String fieldName)
                      throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as a Clob object in the Java programming language.
Parameters:
fieldName - the name of the column from which to retrieve the value
Returns:
a Clob object representing the CLOB value in the specified column

getArray

public java.sql.Array getArray(java.lang.String fieldName)
                        throws java.sql.SQLException
Not implemented
Throws:
UnsupportedOperationException -  

getDate

public java.sql.Date getDate(java.lang.String fieldName,
                             java.util.Calendar cal)
                      throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.
Parameters:
fieldName - the name of the field from which to retrieve the value
cal - the java.util.Calendar object to use in constructing the date
Returns:
the field's value as a java.sql.Date object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
java.sql.SQLException - if an error occurs

getTime

public java.sql.Time getTime(java.lang.String fieldName,
                             java.util.Calendar cal)
                      throws java.sql.SQLException
Returns the value of the designated field of this ResultMap object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.
Parameters:
fieldName - the name of the field
cal - the java.util.Calendar object to use in constructing the time
Returns:
the field's value as a java.sql.Time object; if the value is SQL NULL, the value returned is null in the Java programming language
Throws:
java.sql.SQLException - if an error occurs

getTimestamp

public java.sql.Timestamp getTimestamp(java.lang.String fieldName,
                                       java.util.Calendar cal)
                                throws java.sql.SQLException
Not supported.
Throws:
UnsupportedOperationException -