com.ibatis.sqlmap.engine.exchange
Interface DataExchange

All Known Implementing Classes:
BaseDataExchange, ComplexDataExchange, DomDataExchange, JavaBeanDataExchange, ListDataExchange, MapDataExchange, PrimitiveDataExchange

public interface DataExchange

Interface for exchanging data between a parameter map/result map and the related objects


Method Summary
 CacheKey getCacheKey(RequestScope request, ParameterMap parameterMap, java.lang.Object parameterObject)
          Returns an object capable of being a unique cache key for a parameter object.
 java.lang.Object[] getData(RequestScope request, ParameterMap parameterMap, java.lang.Object parameterObject)
          Gets a data array from a parameter object.
 void initialize(java.util.Map properties)
          Initializes the data exchange instance.
 java.lang.Object setData(RequestScope request, ParameterMap parameterMap, java.lang.Object parameterObject, java.lang.Object[] values)
          Sets values from a data array into a parameter object
 java.lang.Object setData(RequestScope request, ResultMap resultMap, java.lang.Object resultObject, java.lang.Object[] values)
          Sets values from a data array into a result object.
 

Method Detail

initialize

public void initialize(java.util.Map properties)
Initializes the data exchange instance.

Parameters:
properties -

getData

public java.lang.Object[] getData(RequestScope request,
                                  ParameterMap parameterMap,
                                  java.lang.Object parameterObject)
Gets a data array from a parameter object.

Parameters:
request - - the scope of the request
parameterMap - - the parameter map
parameterObject - - the parameter object
Returns:
- the objects

setData

public java.lang.Object setData(RequestScope request,
                                ResultMap resultMap,
                                java.lang.Object resultObject,
                                java.lang.Object[] values)
Sets values from a data array into a result object.

Parameters:
request - - the request scope
resultMap - - the result map
resultObject - - the result object
values - - the values to be mapped
Returns:
the resultObject

setData

public java.lang.Object setData(RequestScope request,
                                ParameterMap parameterMap,
                                java.lang.Object parameterObject,
                                java.lang.Object[] values)
Sets values from a data array into a parameter object

Parameters:
request - - the request scope
parameterMap - - the parameter map
parameterObject - - the parameter object
values - - the values to set
Returns:
parameterObject

getCacheKey

public CacheKey getCacheKey(RequestScope request,
                            ParameterMap parameterMap,
                            java.lang.Object parameterObject)
Returns an object capable of being a unique cache key for a parameter object.

Parameters:
request - - the request scope
parameterMap - - the parameter map
parameterObject - - the parameter object
Returns:
- a cache key