接口 RecordCreator
public interface RecordCreator
Callback interface for creating a CCI Record instance, usually based on the passed-in CCI RecordFactory.Used for input Record creation in CciTemplate. Alternatively, Record instances can be passed into CciTemplate's corresponding
execute
methods directly, either instantiated manually or created through CciTemplate's Record factory methods.Also used for creating default output Records in CciTemplate. This is useful when the JCA connector needs an explicit output Record instance, but no output Records should be passed into CciTemplate's
execute
methods.- 从以下版本开始:
- 1.2
- 作者:
- Thierry Templier, Juergen Hoeller
- 另请参阅:
CciTemplate.execute(javax.resource.cci.InteractionSpec, RecordCreator)
,CciTemplate.execute(javax.resource.cci.InteractionSpec, RecordCreator, RecordExtractor)
,CciTemplate.createIndexedRecord(String)
,CciTemplate.createMappedRecord(String)
,CciTemplate.setOutputRecordCreator(RecordCreator)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Record
createRecord(RecordFactory recordFactory)
Create a CCI Record instance, usually based on the passed-in CCI RecordFactory.
方法详细资料
createRecord
Record createRecord(RecordFactory recordFactory) throws ResourceException, DataAccessException
Create a CCI Record instance, usually based on the passed-in CCI RecordFactory.For use as input creator with CciTemplate's
execute
methods, this method should create a populated Record instance. For use as output Record creator, it should return an empty Record instance.- 参数:
recordFactory
- the CCI RecordFactory (nevernull
, but not guaranteed to be supported by the connector: its create methods might throw NotSupportedException)- 返回:
- the Record instance
- 抛出:
ResourceException
- if thrown by a CCI method, to be auto-converted to a DataAccessExceptionDataAccessException
- in case of custom exceptions