Class EISInteraction

java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourceCall
org.eclipse.persistence.eis.interactions.EISInteraction
All Implemented Interfaces:
Serializable, Cloneable, Call
Direct Known Subclasses:
IndexedInteraction, MappedInteraction

public abstract class EISInteraction extends org.eclipse.persistence.internal.databaseaccess.DatasourceCall
Defines the specification for a call to a JCA interaction. Builds the input and output records from the arguments.
See Also:
Author:
James
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall

    org.eclipse.persistence.internal.databaseaccess.DatasourceCall.ParameterType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Vector
    Defines the arguments to the interaction, these can be the values or argument names/fields the values come from.
    protected String
    Name of the function the interaction describes.
    protected String
    Name to pass to the input record creation.
    protected org.eclipse.persistence.internal.sessions.AbstractRecord
    Holds database row of input values.
    protected jakarta.resource.cci.InteractionSpec
    Adapter specific interaction spec.
    protected Vector
    Defines the output argument names as defined in the output record for the interaction.
    protected Vector
    Defines the field values the output arguments of the interaction map to.
    protected String
    Path to the desired output record if nested.
    protected Map
    Adapter specific properties may be added.

    Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall

    EXECUTE_UPDATE, isNativeConnectionRequired, isPrepared, NO_RETURN, outputCursors, parameterBindings, parameters, parameterTypes, query, RETURN_CURSOR, RETURN_MANY_ROWS, RETURN_ONE_ROW, returnType, shouldProcessTokenInQuotes, usesBinding
  • Constructor Summary

    Constructors
    Constructor
    Description
    PUBLIC: Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addOutputArgument(String parameterAndArgumentFieldName)
    PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it.
    void
    addOutputArgument(String parameterName, String argumentFieldName)
    PUBLIC: Define the output argument to the interaction and the field/argument name to be substitute for it.
    abstract org.eclipse.persistence.internal.sessions.AbstractRecord
    buildRow(jakarta.resource.cci.Record record, EISAccessor accessor)
    INTERNAL: Build a database row from the record returned from the interaction.
    buildRows(jakarta.resource.cci.Record record, EISAccessor accessor)
    Build a collection of database rows from the Record returned from the interaction.
    abstract jakarta.resource.cci.Record
    Create the appropriate input record for this interaction.
    createRecordElement(String elementName, Object value, EISAccessor accessor)
    Create the appropriate record element for the data value.
    The argument fields or values to the interaction that map into the input record.
    PUBLIC: Return the function name of the interaction.
    PUBLIC: Return the input record name.
    org.eclipse.persistence.internal.sessions.AbstractRecord
    INTERNAL: Return the input database row.
    jakarta.resource.cci.InteractionSpec
    PUBLIC: Return the JCA InteractionSpec that defines this EIS interaction.
    getLogString(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
    Return the string for logging purposes.
    The argument names for the output record.
    The argument fields to the interaction that map into the output record.
    PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into.
    Returns the adapter specific properties.
    PUBLIC: Returns the adapter property associated the given name.
    boolean
    Return if argumented.
    boolean
    Return if argumented.
    boolean
     
    void
    prepare(org.eclipse.persistence.internal.sessions.AbstractSession session)
    Set the default record name from the descriptor.
    void
    setArguments(Vector arguments)
    INTERNAL: The argument fields or values to the interaction that map into the input record.
    void
    setFunctionName(String functionName)
    PUBLIC: Set the function name of the interaction.
    void
    PUBLIC: Set the input record name.
    void
    setInputRow(org.eclipse.persistence.internal.sessions.AbstractRecord inputRow)
    PUBLIC: Set the input database row.
    void
    setInteractionSpec(jakarta.resource.cci.InteractionSpec interactionSpec)
    PUBLIC: Set the JCA InteractionSpec that defines this EIS interaction.
    void
    setOutputArgumentNames(Vector outputArgumentNames)
    Set the output argument names.
    void
    setOutputArguments(Vector outputArguments)
    The output arguments.
    void
    setOutputResultPath(String outputResultPath)
    PUBLIC: The output result path defines the root key for the MappedRecord that the desired interaction result is nested into.
    void
    setProperties(Map properties)
    Set the adapter specific properties.
    void
    setProperty(String name, Object value)
    PUBLIC: Set the adapter specific property.
     
    void
    translate(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractRecord modifyRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
    Arguments to the interaction can be passed two ways.

    Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourceCall

    appendIn, appendIn, appendIn, appendInOut, appendInOut, appendInOut, appendInOut, appendInOut, appendLiteral, appendLiteral, appendLiteral, appendModify, appendModify, appendModify, appendOut, appendOut, appendOut, appendOutCursor, appendOutCursor, appendParameter, appendTranslation, appendTranslation, appendTranslation, areManyRowsReturned, argumentMarker, buildNewQueryMechanism, buildQueryMechanism, clone, createField, createInOutParameter, getOutputCursors, getParameterBindings, getParameters, getParameterTypes, getQuery, getQueryString, getReturnType, getValueForInOutParameter, getValueForInParameter, hasOutputCursors, hasParameters, isCursorReturned, isExecuteUpdate, isFinished, isJPQLCall, isNativeConnectionRequired, isNothingReturned, isOneRowReturned, isOutputParameterType, isPrepared, isQueryStringCall, isReturnSet, isSQLCall, isStoredFunctionCall, isStoredPLSQLFunctionCall, isStoredPLSQLProcedureCall, isStoredProcedureCall, isUsesBindingSet, returnCursor, returnManyRows, returnNothing, returnOneRow, setExecuteUpdate, setIsNativeConnectionRequired, setIsPrepared, setParameterBindings, setParameters, setParameterTypes, setQuery, setQueryString, setReturnType, setUsesBinding, translateCustomQuery, translatePureSQLCustomQuery, translateQueryString, translateQueryStringAndBindParameters, translateQueryStringForParameterizedIN, usesBinding, usesBinding, usesBinding, whitespace

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • interactionSpec

      protected jakarta.resource.cci.InteractionSpec interactionSpec
      Adapter specific interaction spec.
    • functionName

      protected String functionName
      Name of the function the interaction describes.
    • inputRecordName

      protected String inputRecordName
      Name to pass to the input record creation.
    • properties

      protected Map properties
      Adapter specific properties may be added.
    • inputRow

      protected org.eclipse.persistence.internal.sessions.AbstractRecord inputRow
      Holds database row of input values.
    • arguments

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

      protected Vector 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.
    • outputArguments

      protected Vector outputArguments
      Defines the field values the output arguments of the interaction map to. These are order dependent with the names.
    • outputResultPath

      protected String outputResultPath
      Path to the desired output record if nested.
  • Constructor Details

    • EISInteraction

      public EISInteraction()
      PUBLIC: Default constructor.
  • Method Details

    • addOutputArgument

      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.
    • addOutputArgument

      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.
    • getArguments

      public Vector getArguments()
      The argument fields or values to the interaction that map into the input record.
    • setArguments

      public void setArguments(Vector arguments)
      INTERNAL: The argument fields or values to the interaction that map into the input record.
    • hasArguments

      public boolean hasArguments()
      Return if argumented.
    • isEISInteraction

      public boolean isEISInteraction()
      Overrides:
      isEISInteraction in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
    • getOutputResultPath

      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.
    • setOutputResultPath

      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.
    • getOutputArgumentNames

      public Vector getOutputArgumentNames()
      The argument names for the output record.
    • getOutputArguments

      public Vector getOutputArguments()
      The argument fields to the interaction that map into the output record.
    • setOutputArguments

      public void setOutputArguments(Vector outputArguments)
      The output arguments.
    • setOutputArgumentNames

      public void setOutputArgumentNames(Vector outputArgumentNames)
      Set the output argument names.
    • hasOutputArguments

      public boolean hasOutputArguments()
      Return if argumented.
    • prepare

      public void prepare(org.eclipse.persistence.internal.sessions.AbstractSession session)
      Set the default record name from the descriptor.
      Overrides:
      prepare in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
    • createRecordElement

      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).
    • getInteractionSpec

      public jakarta.resource.cci.InteractionSpec getInteractionSpec()
      PUBLIC: Return the JCA InteractionSpec that defines this EIS interaction. The InteractionSpec is JCA adapter specific and typically defines the function name.
    • setInteractionSpec

      public void setInteractionSpec(jakarta.resource.cci.InteractionSpec interactionSpec)
      PUBLIC: Set the JCA InteractionSpec that defines this EIS interaction. The InteractionSpec is JCA adapter specific and typically defines the function name.
    • getLogString

      public String getLogString(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
      Return the string for logging purposes.
      Specified by:
      getLogString in interface Call
      Specified by:
      getLogString in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
    • translate

      public void translate(org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, org.eclipse.persistence.internal.sessions.AbstractRecord modifyRow, org.eclipse.persistence.internal.sessions.AbstractSession session)
      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.
      Overrides:
      translate in class org.eclipse.persistence.internal.databaseaccess.DatasourceCall
    • createInputRecord

      public abstract jakarta.resource.cci.Record createInputRecord(EISAccessor accessor)
      Create the appropriate input record for this interaction. Populate the data into the record from this interaction's arguments.
    • buildRow

      public abstract org.eclipse.persistence.internal.sessions.AbstractRecord buildRow(jakarta.resource.cci.Record record, EISAccessor accessor)
      INTERNAL: Build a database row from the record returned from the interaction.
    • buildRows

      public Vector buildRows(jakarta.resource.cci.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.
    • getFunctionName

      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.
    • setFunctionName

      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.
    • getInputRecordName

      public String getInputRecordName()
      PUBLIC: Return the input record name. This is used as the name passed to the adapter when creating the input record.
    • setInputRecordName

      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.
    • getProperties

      public Map getProperties()
      Returns the adapter specific properties.
    • getProperty

      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.
    • setProperties

      public void setProperties(Map properties)
      Set the adapter specific properties.
    • setProperty

      public void setProperty(String name, Object value)
      PUBLIC: Set the adapter specific property.
    • getInputRow

      public org.eclipse.persistence.internal.sessions.AbstractRecord getInputRow()
      INTERNAL: Return the input database row.
    • setInputRow

      public void setInputRow(org.eclipse.persistence.internal.sessions.AbstractRecord inputRow)
      PUBLIC: Set the input database row.
    • toString

      public String toString()
      Overrides:
      toString in class Object