The Spring Framework

org.springframework.jca.cci.object
Class MappingCommAreaOperation

java.lang.Object
  extended by org.springframework.jca.cci.object.EisOperation
      extended by org.springframework.jca.cci.object.MappingRecordOperation
          extended by org.springframework.jca.cci.object.MappingCommAreaOperation
All Implemented Interfaces:
InitializingBean

public abstract class MappingCommAreaOperation
extends MappingRecordOperation

EIS operation object for access to COMMAREA records. Subclass of the generic MappingRecordOperation class.

Since:
1.2
Author:
Thierry Templier

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.jca.cci.object.MappingRecordOperation
MappingRecordOperation.RecordCreatorImpl, MappingRecordOperation.RecordExtractorImpl
 
Constructor Summary
MappingCommAreaOperation()
          Create a new MappingCommAreaQuery.
MappingCommAreaOperation(ConnectionFactory connectionFactory, InteractionSpec interactionSpec)
          Create a new MappingCommAreaQuery.
 
Method Summary
protected abstract  Object bytesToObject(byte[] bytes)
          Method used to convert the COMMAREA's bytes to an object.
protected  Record createInputRecord(RecordFactory recordFactory, Object inObject)
          Subclasses must implement this method to generate an input Record from an input object passed into the execute method.
protected  Object extractOutputData(Record record)
          Subclasses must implement this method to convert the Record returned by CCI execution into a result object for the execute method.
protected abstract  byte[] objectToBytes(Object inObject)
          Method used to convert an object into COMMAREA bytes.
 
Methods inherited from class org.springframework.jca.cci.object.MappingRecordOperation
execute, setOutputRecordCreator
 
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

MappingCommAreaOperation

public MappingCommAreaOperation()
Create a new MappingCommAreaQuery.

See Also:
EisOperation.setConnectionFactory(javax.resource.cci.ConnectionFactory), EisOperation.setInteractionSpec(javax.resource.cci.InteractionSpec)

MappingCommAreaOperation

public MappingCommAreaOperation(ConnectionFactory connectionFactory,
                                InteractionSpec interactionSpec)
Create a new MappingCommAreaQuery.

Parameters:
connectionFactory - ConnectionFactory to use to obtain connections
interactionSpec - specification to configure the interaction
Method Detail

createInputRecord

protected final Record createInputRecord(RecordFactory recordFactory,
                                         Object inObject)
Description copied from class: MappingRecordOperation
Subclasses must implement this method to generate an input Record from an input object passed into the execute method.

Specified by:
createInputRecord in class MappingRecordOperation
inObject - the passed-in input object
Returns:
the CCI input Record
See Also:
MappingRecordOperation.execute(Object)

extractOutputData

protected final Object extractOutputData(Record record)
                                  throws DataAccessException
Description copied from class: MappingRecordOperation
Subclasses must implement this method to convert the Record returned by CCI execution into a result object for the execute method.

Specified by:
extractOutputData in class MappingRecordOperation
Parameters:
record - the Record returned by CCI execution
Returns:
the result object
Throws:
DataAccessException
See Also:
MappingRecordOperation.execute(Object)

objectToBytes

protected abstract byte[] objectToBytes(Object inObject)
                                 throws IOException,
                                        DataAccessException
Method used to convert an object into COMMAREA bytes.

Parameters:
inObject - the input data
Returns:
the COMMAREA's bytes
Throws:
IOException - if thrown by I/O methods
DataAccessException - if conversion failed

bytesToObject

protected abstract Object bytesToObject(byte[] bytes)
                                 throws IOException,
                                        DataAccessException
Method used to convert the COMMAREA's bytes to an object.

Parameters:
bytes - the COMMAREA's bytes
Returns:
the output data
Throws:
IOException - if thrown by I/O methods
DataAccessException - if conversion failed

The Spring Framework

Copyright © 2002-2007 The Spring Framework.