接口 CciOperations
- 所有已知实现类:
CciTemplate
public interface CciOperations
Interface that specifies a basic set of CCI operations on an EIS. Implemented by CciTemplate. Not often used, but a useful option to enhance testability, as it can easily be mocked or stubbed.Alternatively, the standard CCI infrastructure can be mocked. However, mocking this interface constitutes significantly less work.
- 从以下版本开始:
- 1.2
- 作者:
- Juergen Hoeller
- 另请参阅:
CciTemplate
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Record
execute(InteractionSpec spec, Record inputRecord)
Execute the specified interaction on an EIS with CCI.void
execute(InteractionSpec spec, Record inputRecord, Record outputRecord)
Execute the specified interaction on an EIS with CCI.<T> T
execute(InteractionSpec spec, Record inputRecord, RecordExtractor<T> outputExtractor)
Execute the specified interaction on an EIS with CCI.Record
execute(InteractionSpec spec, RecordCreator inputCreator)
Execute the specified interaction on an EIS with CCI.<T> T
execute(InteractionSpec spec, RecordCreator inputCreator, RecordExtractor<T> outputExtractor)
Execute the specified interaction on an EIS with CCI.<T> T
execute(ConnectionCallback<T> action)
Execute a request on an EIS with CCI, implemented as callback action working on a CCI Connection.<T> T
execute(InteractionCallback<T> action)
Execute a request on an EIS with CCI, implemented as callback action working on a CCI Interaction.
方法详细资料
execute
<T> T execute(ConnectionCallback<T> action) throws DataAccessException
Execute a request on an EIS with CCI, implemented as callback action working on a CCI Connection. This allows for implementing arbitrary data access operations, within Spring's managed CCI environment: that is, participating in Spring-managed transactions and converting JCA ResourceExceptions into Spring's DataAccessException hierarchy.The callback action can return a result object, for example a domain object or a collection of domain objects.
- 参数:
action
- the callback object that specifies the action- 返回:
- the result object returned by the action, if any
- 抛出:
DataAccessException
- if there is any problem
execute
<T> T execute(InteractionCallback<T> action) throws DataAccessException
Execute a request on an EIS with CCI, implemented as callback action working on a CCI Interaction. This allows for implementing arbitrary data access operations on a single Interaction, within Spring's managed CCI environment: that is, participating in Spring-managed transactions and converting JCA ResourceExceptions into Spring's DataAccessException hierarchy.The callback action can return a result object, for example a domain object or a collection of domain objects.
- 参数:
action
- the callback object that specifies the action- 返回:
- the result object returned by the action, if any
- 抛出:
DataAccessException
- if there is any problem
execute
Record execute(InteractionSpec spec, Record inputRecord) throws DataAccessException
Execute the specified interaction on an EIS with CCI.- 参数:
spec
- the CCI InteractionSpec instance that defines the interaction (connector-specific)inputRecord
- the input record- 返回:
- the output record
- 抛出:
DataAccessException
- if there is any problem
execute
void execute(InteractionSpec spec, Record inputRecord, Record outputRecord) throws DataAccessException
Execute the specified interaction on an EIS with CCI.- 参数:
spec
- the CCI InteractionSpec instance that defines the interaction (connector-specific)inputRecord
- the input recordoutputRecord
- the output record- 抛出:
DataAccessException
- if there is any problem
execute
Record execute(InteractionSpec spec, RecordCreator inputCreator) throws DataAccessException
Execute the specified interaction on an EIS with CCI.- 参数:
spec
- the CCI InteractionSpec instance that defines the interaction (connector-specific)inputCreator
- object that creates the input record to use- 返回:
- the output record
- 抛出:
DataAccessException
- if there is any problem
execute
<T> T execute(InteractionSpec spec, Record inputRecord, RecordExtractor<T> outputExtractor) throws DataAccessException
Execute the specified interaction on an EIS with CCI.- 参数:
spec
- the CCI InteractionSpec instance that defines the interaction (connector-specific)inputRecord
- the input recordoutputExtractor
- object to convert the output record to a result object- 返回:
- the output data extracted with the RecordExtractor object
- 抛出:
DataAccessException
- if there is any problem
execute
<T> T execute(InteractionSpec spec, RecordCreator inputCreator, RecordExtractor<T> outputExtractor) throws DataAccessException
Execute the specified interaction on an EIS with CCI.- 参数:
spec
- the CCI InteractionSpec instance that defines the interaction (connector-specific)inputCreator
- object that creates the input record to useoutputExtractor
- object to convert the output record to a result object- 返回:
- the output data extracted with the RecordExtractor object
- 抛出:
DataAccessException
- if there is any problem