com.ibatis.sqlmap.engine.mapping.result
Interface ResultMap

All Known Implementing Classes:
BasicResultMap

public interface ResultMap

This is a grouping of ResultMapping objects used to map results back to objects


Field Summary
static java.lang.Object NO_VALUE
           
 
Method Summary
 Discriminator getDiscriminator()
           
 java.lang.String getId()
          A way to identify the ResultMap
 java.lang.Class getResultClass()
          Getter for the class that data wil be mapped into
 ResultMapping[] getResultMappings()
          Getter for the ResultMapping objects
 java.lang.Object[] getResults(RequestScope request, java.sql.ResultSet rs)
          Perform the mapping, and return the results
 java.lang.Object getUniqueKey(java.lang.Object[] values)
          Gets a unique key based on the values provided.
 ResultMap resolveSubMap(RequestScope request, java.sql.ResultSet rs)
           
 java.lang.Object setResultObjectValues(RequestScope request, java.lang.Object resultObject, java.lang.Object[] values)
          Callback method for RowHandler
 

Field Detail

NO_VALUE

public static final java.lang.Object NO_VALUE
Method Detail

getId

public java.lang.String getId()
A way to identify the ResultMap

Returns:
- an ID

getResults

public java.lang.Object[] getResults(RequestScope request,
                                     java.sql.ResultSet rs)
                              throws java.sql.SQLException
Perform the mapping, and return the results

Parameters:
request - - the request scope
rs - - the result set to map
Returns:
- an object array with the data in it
Throws:
java.sql.SQLException - - if an exception is thrown processing the results

setResultObjectValues

public java.lang.Object setResultObjectValues(RequestScope request,
                                              java.lang.Object resultObject,
                                              java.lang.Object[] values)
Callback method for RowHandler

Parameters:
request - - the request scope
resultObject - - the object being populated
values - - the values from the database
Returns:
- the populated object

getResultMappings

public ResultMapping[] getResultMappings()
Getter for the ResultMapping objects

Returns:
- an array of ResultMapping objects

getResultClass

public java.lang.Class getResultClass()
Getter for the class that data wil be mapped into

Returns:
- the class

getUniqueKey

public java.lang.Object getUniqueKey(java.lang.Object[] values)
Gets a unique key based on the values provided.

Parameters:
values - Result values representing a single row of results.
Returns:
The unique key.

resolveSubMap

public ResultMap resolveSubMap(RequestScope request,
                               java.sql.ResultSet rs)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

getDiscriminator

public Discriminator getDiscriminator()