Top Description Fields Constructors Methods
org.eclipse.persistence.eis.interactions

public abstract Class EISInteraction

extends DatasourceCall
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.eis.interactions.IndexedInteraction, org.eclipse.persistence.eis.interactions.MappedInteraction
Imports
java.io.*, java.util.*, jakarta.resource.*, jakarta.resource.cci.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.internal.databaseaccess.Accessor, .DatasourceCall, org.eclipse.persistence.eis.*

Defines the specification for a call to a JCA interaction. Builds the input and output records from the arguments.
Author
James
Since
OracleAS TopLink 10g (10.0.3)

Field Summary

Modifier and TypeField and Description
protected Vector<E>
arguments

Defines the arguments to the interaction, these can be the values or argument names/fields the values come from.

protected String
functionName

Name of the function the interaction describes.

protected String
inputRecordName

Name to pass to the input record creation.

protected AbstractRecord
inputRow

Holds database row of input values.

protected InteractionSpec
interactionSpec

Adapter specific interaction spec.

protected Vector<String>
outputArgumentNames

Defines the output argument names as defined in the output record for the interaction.

protected Vector<DatabaseField>
outputArguments

Defines the field values the output arguments of the interaction map to.

protected String
outputResultPath

Path to the desired output record if nested.

protected Map<String, Object>
properties

Adapter specific properties may be added.

Inherited from org.eclipse.persistence.internal.databaseaccess.DatasourceCall:
EXECUTE_UPDATEisNativeConnectionRequiredisPreparedNO_RETURNoutputCursorsparameterBindingsparametersparameterTypesqueryRETURN_CURSORRETURN_MANY_ROWSRETURN_ONE_ROWreturnTypeshouldProcessTokenInQuotesusesBinding

Constructor Summary

AccessConstructor and Description
protected
EISInteraction()

PUBLIC: Default constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addOutputArgument(String parameterAndArgumentFieldName)

PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it.

public void
addOutputArgument(String parameterName, String argumentFieldName)

PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it.

public abstract AbstractRecord
buildRow(Record record, EISAccessor accessor)

INTERNAL: Build a database row from the record returned from the interaction.

public Vector<AbstractRecord>
buildRows(Record record, EISAccessor accessor)

Build a collection of database rows from the Record returned from the interaction.

public abstract Record
createInputRecord(EISAccessor accessor)

Create the appropriate input record for this interaction.

public Object
createRecordElement(String elementName, Object value, EISAccessor accessor)

Create the appropriate record element for the data value.

public Vector<E>
getArguments()

The argument fields or values to the interaction that map into the input record.

public String
getFunctionName()

PUBLIC: Return the function name of the interaction.

public String
getInputRecordName()

PUBLIC: Return the input record name.

public AbstractRecord
getInputRow()

INTERNAL: Return the input database row.

public InteractionSpec
getInteractionSpec()

PUBLIC: Return the JCA InteractionSpec that defines this EIS interaction.

public String
public Vector<String>
getOutputArgumentNames()

The argument names for the output record.

public Vector<DatabaseField>
getOutputArguments()

The argument fields to the interaction that map into the output record.

public String
getOutputResultPath()

PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into.

public Map<String, Object>
getProperties()

Returns the adapter specific properties.

public Object
getProperty(String name)

PUBLIC: Returns the adapter property associated the given name.

public boolean
hasArguments()

Return if argumented.

public boolean
hasOutputArguments()

Return if argumented.

public boolean
public void
prepare(AbstractSession session)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.prepare.

Set the default record name from the descriptor.
public void
setArguments(Vector<E> arguments)

INTERNAL: The argument fields or values to the interaction that map into the input record.

public void
setFunctionName(String functionName)

PUBLIC: Set the function name of the interaction.

public void
setInputRecordName(String recordName)

PUBLIC: Set the input record name.

public void
setInputRow(AbstractRecord inputRow)

PUBLIC: Set the input database row.

public void
setInteractionSpec(InteractionSpec interactionSpec)

PUBLIC: Set the JCA InteractionSpec that defines this EIS interaction.

public void
setOutputArgumentNames(Vector<String> outputArgumentNames)

Set the output argument names.

public void
setOutputArguments(Vector<DatabaseField> outputArguments)

The output arguments.

public void
setOutputResultPath(String outputResultPath)

PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into.

public void
setProperties(Map<String, Object> properties)

Set the adapter specific properties.

public void
setProperty(String name, Object value)

PUBLIC: Set the adapter specific property.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.translate.

Arguments to the interaction can be passed two ways.
Inherited from org.eclipse.persistence.internal.databaseaccess.DatasourceCall:
appendInappendInappendInappendInOutappendInOutappendInOutappendInOutappendInOutappendLiteralappendLiteralappendLiteralappendModifyappendModifyappendModifyappendOutappendOutappendOutappendOutCursorappendOutCursorappendParameterappendTranslationappendTranslationappendTranslationareManyRowsReturnedargumentMarkerbuildNewQueryMechanismbuildQueryMechanismclonecreateFieldcreateInOutParametergetOutputCursorsgetParameterBindingsgetParametersgetParameterTypesgetQuerygetQueryStringgetReturnTypegetValueForInOutParametergetValueForInParameterhasOutputCursorshasParametersisCursorReturnedisExecuteUpdateisFinishedisJPQLCallisNativeConnectionRequiredisNothingReturnedisOneRowReturnedisOutputParameterTypeisPreparedisQueryStringCallisReturnSetisSQLCallisStoredFunctionCallisStoredPLSQLFunctionCallisStoredPLSQLProcedureCallisStoredProcedureCallisUsesBindingSetreturnCursorreturnManyRowsreturnNothingreturnOneRowsetExecuteUpdatesetIsNativeConnectionRequiredsetIsPreparedsetParameterBindingssetParameterssetParameterTypessetQuerysetQueryStringsetReturnTypesetUsesBindingtranslateCustomQuerytranslatePureSQLCustomQuerytranslateQueryStringtranslateQueryStringAndBindParameterstranslateQueryStringForParameterizedINusesBindingusesBindingusesBindingwhitespace

Field Detail

argumentsback to summary
protected Vector<E> arguments

Defines the arguments to the interaction, these can be the values or argument names/fields the values come from.

functionNameback to summary
protected String functionName

Name of the function the interaction describes.

inputRecordNameback to summary
protected String inputRecordName

Name to pass to the input record creation.

inputRowback to summary
protected AbstractRecord inputRow

Holds database row of input values.

interactionSpecback to summary
protected InteractionSpec interactionSpec

Adapter specific interaction spec.

outputArgumentNamesback to summary
protected Vector<String> outputArgumentNames

Defines the output argument names as defined in the output record for the interaction. This is shared as indexed interaction may still have mapped results.

outputArgumentsback to summary
protected Vector<DatabaseField> outputArguments

Defines the field values the output arguments of the interaction map to. These are order dependent with the names.

outputResultPathback to summary
protected String outputResultPath

Path to the desired output record if nested.

propertiesback to summary
protected Map<String, Object> properties

Adapter specific properties may be added.

Constructor Detail

EISInteractionback to summary
protected EISInteraction()

PUBLIC: Default constructor.

Method Detail

addOutputArgumentback to summary
public void addOutputArgument(String parameterAndArgumentFieldName)

PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it. This is only required if an output row is not used. The parameterAndArgumentFieldName is the name of the output record argument expected, and is the field or argument name to be used to be used for it. These names are assumed to be the same, if not this method can be called with two arguments.

addOutputArgumentback to summary
public void addOutputArgument(String parameterName, String argumentFieldName)

PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it. This is only required if an output row is not used. The parameterName is the name of the output record argument expected. The argumentFieldName is the field or argument name to be used to be used for it. If these names are the same (as they normally are) this method can be called with a single argument.

buildRowback to summary
public abstract AbstractRecord buildRow(Record record, EISAccessor accessor)

INTERNAL: Build a database row from the record returned from the interaction.

buildRowsback to summary
public Vector<AbstractRecord> buildRows(Record record, EISAccessor accessor)

Build a collection of database rows from the Record returned from the interaction. This handles IndexedRecords used as sets of result records, and a single MappedRecord with a list of result records.

createInputRecordback to summary
public abstract Record createInputRecord(EISAccessor accessor)

Create the appropriate input record for this interaction. Populate the data into the record from this interaction's arguments.

createRecordElementback to summary
public Object createRecordElement(String elementName, Object value, EISAccessor accessor)

Create the appropriate record element for the data value. If the value is a collection, create a collection of elements, if the value is a map, create a nested map, otherwise just return the value (primitive data).

getArgumentsback to summary
public Vector<E> getArguments()

The argument fields or values to the interaction that map into the input record.

getFunctionNameback to summary
public String getFunctionName()

PUBLIC: Return the function name of the interaction. A function name is a common properties for a CCI InteractionSpec. This cannot be generically set on the spec as it is not in the interface however the EIS platform may make use of this in build the interaction spec.

getInputRecordNameback to summary
public String getInputRecordName()

PUBLIC: Return the input record name. This is used as the name passed to the adapter when creating the input record.

getInputRowback to summary
public AbstractRecord getInputRow()

INTERNAL: Return the input database row.

getInteractionSpecback to summary
public InteractionSpec getInteractionSpec()

PUBLIC: Return the JCA InteractionSpec that defines this EIS interaction. The InteractionSpec is JCA adapter specific and typically defines the function name.

getLogStringback to summary
public String getLogString(Accessor accessor)

Implements abstract org.eclipse.persistence.internal.databaseaccess.DatasourceCall.getLogString.

Implements org.eclipse.persistence.queries.Call.getLogString.

Return the string for logging purposes.

Annotations
@Override
getOutputArgumentNamesback to summary
public Vector<String> getOutputArgumentNames()

The argument names for the output record.

getOutputArgumentsback to summary
public Vector<DatabaseField> getOutputArguments()

The argument fields to the interaction that map into the output record.

getOutputResultPathback to summary
public String getOutputResultPath()

PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into. This is required for read interactions that need a nested record to build from the mapped object.

getPropertiesback to summary
public Map<String, Object> getProperties()

Returns the adapter specific properties.

getPropertyback to summary
public Object getProperty(String name)

PUBLIC: Returns the adapter property associated the given name. If the interaction is associated with a query that has a descriptor, The descriptor's properties are automatically inherited.

hasArgumentsback to summary
public boolean hasArguments()

Return if argumented.

hasOutputArgumentsback to summary
public boolean hasOutputArguments()

Return if argumented.

isEISInteractionback to summary
public boolean isEISInteraction()

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.isEISInteraction.

Annotations
@Override
prepareback to summary
public void prepare(AbstractSession session)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.prepare.

Set the default record name from the descriptor.

Annotations
@Override
setArgumentsback to summary
public void setArguments(Vector<E> arguments)

INTERNAL: The argument fields or values to the interaction that map into the input record.

setFunctionNameback to summary
public void setFunctionName(String functionName)

PUBLIC: Set the function name of the interaction. A function name is a common properties for a CCI InteractionSpec. This cannot be generically set on the spec as it is not in the interface however the EIS platform may make use of this in build the interaction spec.

setInputRecordNameback to summary
public void setInputRecordName(String recordName)

PUBLIC: Set the input record name. This is used as the name passed to the adapter when creating the input record.

setInputRowback to summary
public void setInputRow(AbstractRecord inputRow)

PUBLIC: Set the input database row.

setInteractionSpecback to summary
public void setInteractionSpec(InteractionSpec interactionSpec)

PUBLIC: Set the JCA InteractionSpec that defines this EIS interaction. The InteractionSpec is JCA adapter specific and typically defines the function name.

setOutputArgumentNamesback to summary
public void setOutputArgumentNames(Vector<String> outputArgumentNames)

Set the output argument names.

setOutputArgumentsback to summary
public void setOutputArguments(Vector<DatabaseField> outputArguments)

The output arguments.

setOutputResultPathback to summary
public void setOutputResultPath(String outputResultPath)

PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into. This is required for read interactions that need a nested record to build from the mapped object.

setPropertiesback to summary
public void setProperties(Map<String, Object> properties)

Set the adapter specific properties.

setPropertyback to summary
public void setProperty(String name, Object value)

PUBLIC: Set the adapter specific property.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
translateback to summary
public void translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)

Overrides org.eclipse.persistence.internal.databaseaccess.DatasourceCall.translate.

Arguments to the interaction can be passed two ways. The entire argument row can be converted to the input record, or the arguments from the row can be translated into the interaction parameters.

Annotations
@Override