|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibatis.sqlmap.engine.mapping.result.ResultMap
public class ResultMap
Basic implementation of ResultMap interface
Field Summary | |
---|---|
protected boolean |
allowRemapping
|
protected SqlMapExecutorDelegate |
delegate
|
static Object |
NO_VALUE
|
Constructor Summary | |
---|---|
ResultMap(SqlMapExecutorDelegate delegate)
Constructor to pass a SqlMapExecutorDelegate in |
Method Summary | |
---|---|
void |
addGroupByProperty(String name)
|
void |
addNestedResultMappings(ResultMapping mapping)
|
protected Object |
doNullMapping(Object value,
ResultMapping mapping)
|
DataExchange |
getDataExchange()
Getter for the DataExchange object to be used |
SqlMapExecutorDelegate |
getDelegate()
Getter for the SqlMapExecutorDelegate |
Discriminator |
getDiscriminator()
|
String |
getId()
|
List |
getNestedResultMappings()
|
protected Object |
getNestedSelectMappingValue(StatementScope statementScope,
ResultSet rs,
ResultMapping mapping,
Class targetType)
|
protected Object |
getPrimitiveResultMappingValue(ResultSet rs,
ResultMapping mapping)
|
String |
getResource()
Getter for the resource (used to report errors) |
Class |
getResultClass()
|
int |
getResultCount()
Getter for the number of ResultMapping objects |
ResultMapping[] |
getResultMappings()
|
Object[] |
getResults(StatementScope statementScope,
ResultSet rs)
Read a row from a resultset and map results to an array. |
Object |
getUniqueKey(Object[] values)
|
Object |
getUniqueKey(String keyPrefix,
Object[] values)
|
String |
getXmlName()
Getter (used by DomDataExchange) for the xml name of the results |
Iterator |
groupByProps()
|
boolean |
hasGroupBy()
|
ResultMap |
resolveSubMap(StatementScope statementScope,
ResultSet rs)
|
void |
setDataExchange(DataExchange dataExchange)
Setter for the DataExchange object to be used |
void |
setDiscriminator(Discriminator discriminator)
|
void |
setId(String id)
Setter for the ID |
protected void |
setNestedResultMappingValue(ResultMapping mapping,
StatementScope statementScope,
Object resultObject,
Object[] values)
Some changes in this method for IBATIS-225: We no longer require the nested property to be a collection. |
void |
setResource(String resource)
Setter for the resource (used by the SqlMapBuilder) |
void |
setResultClass(Class resultClass)
Setter for the result class (what the results will be mapped into) |
void |
setResultMappingList(List resultMappingList)
Setter for a list of the individual ResultMapping objects |
Object |
setResultObjectValues(StatementScope statementScope,
Object resultObject,
Object[] values)
|
void |
setXmlName(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 SqlMapExecutorDelegate delegate
protected boolean allowRemapping
public static final Object NO_VALUE
Constructor Detail |
---|
public ResultMap(SqlMapExecutorDelegate delegate)
delegate
- - the SqlMapExecutorDelegateMethod Detail |
---|
public SqlMapExecutorDelegate getDelegate()
public String getId()
public void setId(String id)
id
- - the new IDpublic Class getResultClass()
public Object getUniqueKey(String keyPrefix, Object[] values)
public Object getUniqueKey(Object[] values)
public void setResultClass(Class resultClass)
resultClass
- - the result classpublic DataExchange getDataExchange()
public void setDataExchange(DataExchange dataExchange)
dataExchange
- - the new DataExchange objectpublic String getXmlName()
public void setXmlName(String xmlName)
xmlName
- - the namepublic String getResource()
public void setResource(String resource)
resource
- - the resource namepublic void addGroupByProperty(String name)
public boolean hasGroupBy()
public Iterator groupByProps()
public void addNestedResultMappings(ResultMapping mapping)
public List getNestedResultMappings()
public ResultMapping[] getResultMappings()
public void setDiscriminator(Discriminator discriminator)
public Discriminator getDiscriminator()
public ResultMap resolveSubMap(StatementScope statementScope, ResultSet rs) throws SQLException
SQLException
public void setResultMappingList(List resultMappingList)
resultMappingList
- - the listpublic int getResultCount()
public Object[] getResults(StatementScope statementScope, ResultSet rs) throws SQLException
statementScope
- scope of the requestrs
- ResultSet to read from
SQLException
public Object setResultObjectValues(StatementScope statementScope, Object resultObject, Object[] values)
protected void setNestedResultMappingValue(ResultMapping mapping, StatementScope statementScope, Object resultObject, Object[] values)
mapping
- statementScope
- resultObject
- values
- protected Object getNestedSelectMappingValue(StatementScope statementScope, ResultSet rs, ResultMapping mapping, Class targetType) throws SQLException
SQLException
protected Object getPrimitiveResultMappingValue(ResultSet rs, ResultMapping mapping) throws SQLException
SQLException
protected Object doNullMapping(Object value, ResultMapping mapping) throws SqlMapException
SqlMapException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |