|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibatis.sqlmap.engine.mapping.result.BasicResultMap
Basic implementation of ResultMap interface
Field Summary | |
protected boolean |
allowRemapping
|
Fields inherited from interface com.ibatis.sqlmap.engine.mapping.result.ResultMap |
NO_VALUE |
Constructor Summary | |
BasicResultMap(SqlMapExecutorDelegate delegate)
Constructor to pass a SqlMapExecutorDelegate in |
Method Summary | |
void |
addGroupByProperty(java.lang.String name)
|
void |
addNestedResultMappings(ResultMapping mapping)
|
protected java.lang.Object |
doNullMapping(java.lang.Object value,
BasicResultMapping mapping)
|
DataExchange |
getDataExchange()
Getter for the DataExchange object to be used |
SqlMapExecutorDelegate |
getDelegate()
Getter for the SqlMapExecutorDelegate |
Discriminator |
getDiscriminator()
|
java.lang.String |
getId()
A way to identify the ResultMap |
java.util.List |
getNestedResultMappings()
|
protected java.lang.Object |
getNestedSelectMappingValue(RequestScope request,
java.sql.ResultSet rs,
BasicResultMapping mapping,
java.lang.Class targetType)
|
protected java.lang.Object |
getPrimitiveResultMappingValue(java.sql.ResultSet rs,
BasicResultMapping mapping)
|
java.lang.String |
getResource()
Getter for the resource (used to report errors) |
java.lang.Class |
getResultClass()
Getter for the class that data wil be mapped into |
int |
getResultCount()
Getter for the number of ResultMapping objects |
ResultMapping[] |
getResultMappings()
Getter for the ResultMapping objects |
java.lang.Object[] |
getResults(RequestScope request,
java.sql.ResultSet rs)
Read a row from a resultset and map results to an array. |
java.lang.Object |
getUniqueKey(java.lang.Object[] values)
Gets a unique key based on the values provided. |
java.lang.Object |
getUniqueKey(java.lang.String keyPrefix,
java.lang.Object[] values)
|
java.lang.String |
getXmlName()
Getter (used by DomDataExchange) for the xml name of the results |
java.util.Iterator |
groupByProps()
|
boolean |
hasGroupBy()
|
ResultMap |
resolveSubMap(RequestScope request,
java.sql.ResultSet rs)
|
void |
setDataExchange(DataExchange dataExchange)
Setter for the DataExchange object to be used |
void |
setDiscriminator(Discriminator discriminator)
|
void |
setId(java.lang.String id)
Setter for the ID |
protected void |
setNestedResultMappingValue(BasicResultMapping mapping,
RequestScope request,
java.lang.Object resultObject,
java.lang.Object[] values)
Some changes in this method for IBATIS-225: We no longer require the nested property to be a collection. |
void |
setResource(java.lang.String resource)
Setter for the resource (used by the SqlMapBuilder) |
void |
setResultClass(java.lang.Class resultClass)
Setter for the result class (what the results will be mapped into) |
void |
setResultMappingList(java.util.List resultMappingList)
Setter for a list of the individual ResultMapping objects |
java.lang.Object |
setResultObjectValues(RequestScope request,
java.lang.Object resultObject,
java.lang.Object[] values)
Callback method for RowHandler |
void |
setXmlName(java.lang.String xmlName)
Setter (used by the SqlMapBuilder) for the xml name of the results |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean allowRemapping
Constructor Detail |
public BasicResultMap(SqlMapExecutorDelegate delegate)
delegate
- - the SqlMapExecutorDelegateMethod Detail |
public SqlMapExecutorDelegate getDelegate()
public java.lang.String getId()
ResultMap
getId
in interface ResultMap
public void setId(java.lang.String id)
id
- - the new IDpublic java.lang.Class getResultClass()
ResultMap
getResultClass
in interface ResultMap
public java.lang.Object getUniqueKey(java.lang.String keyPrefix, java.lang.Object[] values)
public java.lang.Object getUniqueKey(java.lang.Object[] values)
ResultMap
getUniqueKey
in interface ResultMap
values
- Result values representing a single row of results.
public void setResultClass(java.lang.Class resultClass)
resultClass
- - the result classpublic DataExchange getDataExchange()
public void setDataExchange(DataExchange dataExchange)
dataExchange
- - the new DataExchange objectpublic java.lang.String getXmlName()
public void setXmlName(java.lang.String xmlName)
xmlName
- - the namepublic java.lang.String getResource()
public void setResource(java.lang.String resource)
resource
- - the resource namepublic void addGroupByProperty(java.lang.String name)
public boolean hasGroupBy()
public java.util.Iterator groupByProps()
public void addNestedResultMappings(ResultMapping mapping)
public java.util.List getNestedResultMappings()
public ResultMapping[] getResultMappings()
ResultMap
getResultMappings
in interface ResultMap
public void setDiscriminator(Discriminator discriminator)
public Discriminator getDiscriminator()
getDiscriminator
in interface ResultMap
public ResultMap resolveSubMap(RequestScope request, java.sql.ResultSet rs) throws java.sql.SQLException
resolveSubMap
in interface ResultMap
java.sql.SQLException
public void setResultMappingList(java.util.List resultMappingList)
resultMappingList
- - the listpublic int getResultCount()
public java.lang.Object[] getResults(RequestScope request, java.sql.ResultSet rs) throws java.sql.SQLException
getResults
in interface ResultMap
request
- scope of the requestrs
- ResultSet to read from
java.sql.SQLException
public java.lang.Object setResultObjectValues(RequestScope request, java.lang.Object resultObject, java.lang.Object[] values)
ResultMap
setResultObjectValues
in interface ResultMap
request
- - the request scoperesultObject
- - the object being populatedvalues
- - the values from the database
protected void setNestedResultMappingValue(BasicResultMapping mapping, RequestScope request, java.lang.Object resultObject, java.lang.Object[] values)
mapping
- request
- resultObject
- values
- protected java.lang.Object getNestedSelectMappingValue(RequestScope request, java.sql.ResultSet rs, BasicResultMapping mapping, java.lang.Class targetType) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Object getPrimitiveResultMappingValue(java.sql.ResultSet rs, BasicResultMapping mapping) throws java.sql.SQLException
java.sql.SQLException
protected java.lang.Object doNullMapping(java.lang.Object value, BasicResultMapping mapping) throws SqlMapException
SqlMapException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |