| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jca.cci.object.EisOperation
org.springframework.jca.cci.object.MappingRecordOperation
public abstract class MappingRecordOperation
EIS operation object that expects mapped input and output objects, converting to and from CCI Records.
Concrete subclasses must implement the abstract
 createInputRecord(RecordFactory, Object) and
 extractOutputData(Record) methods, to create an input
 Record from an object and to convert an output Record into an object,
 respectively.
createInputRecord(javax.resource.cci.RecordFactory, Object), 
extractOutputData(javax.resource.cci.Record)| Nested Class Summary | |
|---|---|
| protected  class | MappingRecordOperation.RecordCreatorImplImplementation of RecordCreator that calls the enclosing class's createInputRecordmethod. | 
| protected  class | MappingRecordOperation.RecordExtractorImplImplementation of RecordExtractor that calls the enclosing class's extractOutputDatamethod. | 
| Constructor Summary | |
|---|---|
| MappingRecordOperation()Constructor that allows use as a JavaBean. | |
| MappingRecordOperation(ConnectionFactory connectionFactory,
                       InteractionSpec interactionSpec)Convenient constructor with ConnectionFactory and specifications (connection and interaction). | |
| Method Summary | |
|---|---|
| protected abstract  Record | createInputRecord(RecordFactory recordFactory,
                  Object inputObject)Subclasses must implement this method to generate an input Record from an input object passed into the executemethod. | 
|  Object | execute(Object inputObject)Execute the interaction encapsulated by this operation object. | 
| protected abstract  Object | extractOutputData(Record outputRecord)Subclasses must implement this method to convert the Record returned by CCI execution into a result object for the executemethod. | 
|  void | setOutputRecordCreator(RecordCreator creator)Set a RecordCreator that should be used for creating default output Records. | 
| Methods inherited from class org.springframework.jca.cci.object.EisOperation | 
|---|
| afterPropertiesSet, getCciTemplate, getInteractionSpec, setCciTemplate, setConnectionFactory, setInteractionSpec | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public MappingRecordOperation()
public MappingRecordOperation(ConnectionFactory connectionFactory,
                              InteractionSpec interactionSpec)
connectionFactory - ConnectionFactory to use to obtain connections| Method Detail | 
|---|
public void setOutputRecordCreator(RecordCreator creator)
Default is none: CCI's Interaction.execute variant
 that returns an output Record will be called.
 
Specify a RecordCreator here if you always need to call CCI's
 Interaction.execute variant with a passed-in output Record.
 This RecordCreator will then be invoked to create a default output Record instance.
Interaction.execute(javax.resource.cci.InteractionSpec, Record), 
Interaction.execute(javax.resource.cci.InteractionSpec, Record, Record), 
CciTemplate.setOutputRecordCreator(org.springframework.jca.cci.core.RecordCreator)
public Object execute(Object inputObject)
               throws DataAccessException
inputObject - the input data, to be converted to a Record
 by the createInputRecord method
extractOutputData method
DataAccessException - if there is any problemcreateInputRecord(javax.resource.cci.RecordFactory, java.lang.Object), 
extractOutputData(javax.resource.cci.Record)
protected abstract Record createInputRecord(RecordFactory recordFactory,
                                            Object inputObject)
                                     throws ResourceException,
                                            DataAccessException
execute method.
inputObject - the passed-in input object
ResourceException - if thrown by a CCI method, to be auto-converted
 to a DataAccessException
DataAccessExceptionexecute(Object)
protected abstract Object extractOutputData(Record outputRecord)
                                     throws ResourceException,
                                            SQLException,
                                            DataAccessException
execute method.
outputRecord - the Record returned by CCI execution
ResourceException - if thrown by a CCI method, to be auto-converted
 to a DataAccessException
SQLException
DataAccessExceptionexecute(Object)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||