All Implemented Interfaces:
Serializable, Cloneable, Call
Direct Known Subclasses:
PLSQLStoredFunctionCall

public class PLSQLStoredProcedureCall extends StoredProcedureCall
Purpose: Generates an Anonymous PL/SQL block to invoke the specified Stored Procedure with arguments that may or may not have JDBC equivalents. This handles conversion of PLSQL Record and Table types into SQL ARRAY (VARRAY) and STRUCT (OBJECT TYPE). It also handles conversion of flat PLSQL Record types and PLSQL BOOLEAN and other basic types.
See Also:
  • Field Details

    • arguments

      protected List<PLSQLargument> arguments
      List of procedure IN/OUT/INOUT arguments.
    • originalIndex

      protected int originalIndex
      Keeps track of the next procedure argument index.
    • translationRow

      protected AbstractRecord translationRow
      Translation row stored after translation on the call clone, used only for logging.
    • functionId

      protected int functionId
      Id used to generate unique local functions.
  • Constructor Details

    • PLSQLStoredProcedureCall

      public PLSQLStoredProcedureCall()
  • Method Details

    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, DatabaseType databaseType)
      PUBLIC: Add a named IN argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex)
    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, DatabaseType databaseType, int length)
      PUBLIC: Add a named IN argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra length parameter indicates that this parameter, when used in an Anonymous PL/SQL block, requires a length.
    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, DatabaseType databaseType, int precision, int scale)
      PUBLIC: Add a named IN argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra scale and precision parameters indicates that this parameter, when used in an Anonymous PL/SQL block, requires scale and precision specification
    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, String argumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the input argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the user. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type required by the procedure.
      Overrides:
      addNamedArgument in class StoredProcedureCall
    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, String argumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addNamedArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, DatabaseType databaseType)
      PUBLIC: Add a named IN OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex)
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, DatabaseType databaseType, int length)
      PUBLIC: Add a named IN OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra length parameter indicates that this parameter, when used in an Anonymous PL/SQL block, requires a length.
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, DatabaseType databaseType, int precision, int scale)
      PUBLIC: Add a named IN OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra scale and precision parameters indicates that this parameter, when used in an Anonymous PL/SQL block, requires scale and precision specification
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String inArgumentFieldName, String outArgumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this dependent on the type returned from the procedure.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String inArgumentFieldName, String outArgumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String inArgumentFieldName, String outArgumentFieldName, int type, String typeName, Class<?> classType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for STRUCT and ARRAY types. The classType is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String inArgumentFieldName, String outArgumentFieldName, int type, String typeName, Class<?> javaType, DatabaseField nestedType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible. The nestedType is a DatabaseField with type information set to match the VARRAYs object types
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, DatabaseType databaseType)
      PUBLIC: Add a named OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex)
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, DatabaseType databaseType, int length)
      PUBLIC: Add a named OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra length parameter indicates that this parameter, when used in an Anonymous PL/SQL block, requires a length.
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, DatabaseType databaseType, int precision, int scale)
      PUBLIC: Add a named OUT argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex). The extra scale and precision parameters indicates that this parameter, when used in an Anonymous PL/SQL block, requires scale and precision specification
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName, int jdbcType, String typeName, Class<?> javaType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used is the result of the output row. The jdbcType is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY and STRUCT types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName, int jdbcType, String typeName, Class<?> javaType, DatabaseField nestedType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used is the result of the output row. The jdbcType is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY and STRUCT types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible. The nestedType is a DatabaseField with type information set to match the VARRAYs object types
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type returned from the procedure.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedArgument

      public void addNamedArgument(String procedureParameterAndArgumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterAndArgumentFieldName is the name of the procedure argument expected, and is the field or argument name to be used to pass to the procedure. These names are assumed to be the same, if not this method can be called with two arguments.
      Overrides:
      addNamedArgument in class StoredProcedureCall
    • addNamedArgumentValue

      public void addNamedArgumentValue(String procedureParameterName, Object argumentValue)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure and the value to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentValue is the value of the argument to be used to pass to the procedure.
      Overrides:
      addNamedArgumentValue in class StoredProcedureCall
    • addNamedArgument

      public void addNamedArgument(String procedureParameterName, String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument.
      Overrides:
      addNamedArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterAndArgumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterAndArgumentFieldName is the name of the procedure argument expected, the field or argument name to be used to pass to the procedure and, the field or argument name to be used is the result of the output row.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure and is the result of the output row.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String argumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure and is the result of the output row. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgument

      public void addNamedInOutputArgument(String procedureParameterName, String inArgumentFieldName, String outArgumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type the Java class desired back from the procedure, if a struct is returned and the class has an ObjectRelationalDataTypeDescriptor defined .
      Overrides:
      addNamedInOutputArgument in class StoredProcedureCall
    • addNamedInOutputArgumentValue

      public void addNamedInOutputArgumentValue(String procedureParameterName, Object inArgumentValue, String outArgumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure and the field/argument name to be substitute for it on the way in and out. The procedureParameterName is the name of the procedure argument expected. The inArgumentValue is the value of the argument to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addNamedInOutputArgumentValue in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterAndArgumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterAndArgumentFieldName is the name of the procedure argument expected, and is the field or argument name to be used to pass to the procedure. These names are assumed to be the same, if not this method can be called with two arguments.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • addNamedOutputArgument

      public void addNamedOutputArgument(String procedureParameterName, String argumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the output argument to the stored procedure and the field/argument name to be substitute for it. The procedureParameterName is the name of the procedure argument expected. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addNamedOutputArgument in class StoredProcedureCall
    • useNamedCursorOutputAsResultSet

      public void useNamedCursorOutputAsResultSet(String argumentName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Used for Oracle result sets through procedures. This can only be used if the arguments are not named but ordered.
      Overrides:
      useNamedCursorOutputAsResultSet in class StoredProcedureCall
    • addUnamedArgument

      public void addUnamedArgument(String argumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the user. The type is the type of Java class for the field, and is dependent on the type required by the procedure. This is used to set the type in case null is passed in.
      Overrides:
      addUnamedArgument in class StoredProcedureCall
    • addUnamedArgument

      public void addUnamedArgument(String argumentFieldName, int type, String typeName, DatabaseField nestedType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, as required for STRUCT and ARRAY types. The nestedType is a DatabaseField with type information set to match the VARRAYs object types
      Overrides:
      addUnamedArgument in class StoredProcedureCall
    • addUnamedArgument

      public void addUnamedArgument(String argumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type required by the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addUnamedArgument in class StoredProcedureCall
    • addUnamedArgument

      public void addUnamedArgument(String argumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the user. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type required by the procedure.
      Overrides:
      addUnamedArgument in class StoredProcedureCall
    • addUnamedArgument

      public void addUnamedArgument(String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure.
      Overrides:
      addUnamedArgument in class StoredProcedureCall
    • addUnamedArgumentValue

      public void addUnamedArgumentValue(Object argumentValue)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentValue is the value of the argument to be used to pass to the procedure.
      Overrides:
      addUnamedArgumentValue in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String argumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field name of the argument to be used to pass to the procedure and to be used is the result of the output row. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String inArgumentFieldName, String outArgumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The inArgumentFieldName is the field name of the argument to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String inArgumentFieldName, String outArgumentFieldName, int type, String typeName, Class<?> collection, DatabaseField nestedType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field or argument name to be used is the result of the output row. The jdbcType is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY and STRUCT types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible. The nestedType is a DatabaseField with type information set to match the VARRAYs object types
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String inArgumentFieldName, String outArgumentFieldName, int type, String typeName, Class<?> collection)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The inArgumentFieldName is the field or argument name to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY types. The collectionClass is the java class to return instead of the ARRAY type.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String inArgumentFieldName, String outArgumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The inArgumentFieldName is the field name of the argument to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String inArgumentFieldName, String outArgumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the argument to the stored procedure for the index argument. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The inArgumentFieldName is the field name of the argument to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the JDBC type code, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgument

      public void addUnamedInOutputArgument(String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The argumentFieldName is the field name of the argument to be used to pass to the procedure and to be used is the result of the output row.
      Overrides:
      addUnamedInOutputArgument in class StoredProcedureCall
    • addUnamedInOutputArgumentValue

      public void addUnamedInOutputArgumentValue(Object inArgumentValue, String outArgumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the inoutput argument to the stored procedure for the index argument and the field/argument name to be substitute for it on the way in and out. This method is used if the procedure is not named and the order is explicit, arguments must be added in the correct order. The inArgumentValue is the value of the argument to be used to pass to the procedure. The outArgumentFieldName is the field or argument name to be used is the result of the output row. If these names are the same (as they normally are) this method can be called with a single argument. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedInOutputArgumentValue in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName, Class<?> type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName, int jdbcType, String typeName, Class<?> javaType, DatabaseField nestedType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used is the result of the output row. The jdbcType is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY and STRUCT types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible. The nestedType is a DatabaseField with type information set to match the VARRAYs object types
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName, int jdbcType, String typeName, Class<?> javaType)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used is the result of the output row. The jdbcType is the JDBC type code, this dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY and STRUCT types. The javaType is the java class to return instead of the ARRAY and STRUCT types if a conversion is possible.
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName, int type, String typeName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. The type is the JDBC type code, this is dependent on the type returned from the procedure. The typeName is the JDBC type name, this may be required for ARRAY or STRUCT types.
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName, int type)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. The type is the JDBC type code, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • addUnamedOutputArgument

      public void addUnamedOutputArgument(String argumentFieldName)
      Description copied from class: StoredProcedureCall
      PUBLIC: Define the field/argument name to be substitute for the index output argument. This method is used if the procedure is not named and the order is explicit, names must be added in the correct order. The argumentFieldName is the field or argument name to be used to pass to the procedure. The type is the type of Java class desired back from the procedure, this is dependent on the type returned from the procedure.
      Overrides:
      addUnamedOutputArgument in class StoredProcedureCall
    • useUnnamedCursorOutputAsResultSet

      public void useUnnamedCursorOutputAsResultSet()
      Description copied from class: StoredProcedureCall
      PUBLIC: Used for Oracle result sets through procedures. This can only be used if the arguments are not named but ordered.
      Overrides:
      useUnnamedCursorOutputAsResultSet in class StoredProcedureCall
    • useNamedCursorOutputAsResultSet

      public void useNamedCursorOutputAsResultSet(String argumentName, DatabaseType databaseType)
      PUBLIC: Add a named OUT cursor argument to the stored procedure. The databaseType parameter classifies the parameter (JDBCType vs. OraclePLSQLType, simple vs. complex).
    • assignIndices

      protected void assignIndices()
      INTERNAL compute the re-ordered indices - Do the IN args first, then the 'IN-half' of the INOUT args next, the OUT args, then the 'OUT-half' of the INOUT args
    • buildDeclareBlock

      protected void buildDeclareBlock(StringBuilder sb, List<PLSQLargument> arguments)
      INTERNAL Generate portion of the Anonymous PL/SQL block that declares the temporary variables in the DECLARE section.
    • addNestedFunctionsForArgument

      protected void addNestedFunctionsForArgument(List<String> functions, PLSQLargument argument, DatabaseType databaseType, Set<DatabaseType> processed)
      INTERNAL Add the nested function string required for the type and its subtypes. The functions must be added in inverse order to resolve dependencies.
    • buildNestedFunctions

      protected void buildNestedFunctions(StringBuilder stream, List<PLSQLargument> arguments)
      INTERNAL Generate portion of the Anonymous PL/SQL block with PL/SQL conversion routines as nested functions.
    • buildBeginBlock

      protected void buildBeginBlock(StringBuilder sb, List<PLSQLargument> arguments)
      INTERNAL Generate portion of the Anonymous PL/SQL block that assigns fields at the beginning of the BEGIN block (before invoking the target procedure).
    • buildProcedureInvocation

      protected void buildProcedureInvocation(StringBuilder sb, List<PLSQLargument> arguments)
      INTERNAL Generate portion of the Anonymous PL/SQL block that invokes the target procedure.
    • buildOutAssignments

      protected void buildOutAssignments(StringBuilder sb, List<PLSQLargument> arguments)
      INTERNAL Generate portion of the Anonymous PL/SQL block after the target procedures has been invoked and OUT parameters must be handled.
    • prepareInternal

      protected void prepareInternal(AbstractSession session)
      Generate the Anonymous PL/SQL block
      Overrides:
      prepareInternal in class StoredProcedureCall
    • prepareStatement

      public Statement prepareStatement(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session) throws SQLException
      INTERNAL: Prepare the JDBC statement, this may be parameterize or a call statement. If caching statements this must check for the pre-prepared statement and re-bind to it.
      Overrides:
      prepareStatement in class StoredProcedureCall
      Throws:
      SQLException
    • translate

      public void translate(AbstractRecord translationRow, AbstractRecord modifyRow, AbstractSession session)
      Translate the PLSQL procedure translation row, into the row expected by the SQL procedure. This handles expanding and re-ordering parameters.
      Overrides:
      translate in class DatabaseCall
    • buildOutputRow

      public AbstractRecord buildOutputRow(CallableStatement statement, DatabaseAccessor accessor, AbstractSession session) throws SQLException
      Translate the SQL procedure output row, into the row expected by the PLSQL procedure. This handles re-ordering parameters.
      Overrides:
      buildOutputRow in class DatabaseCall
      Throws:
      SQLException
    • getLogString

      public String getLogString(Accessor accessor)
      INTERNAL: Build the log string for the call.
      Specified by:
      getLogString in interface Call
      Overrides:
      getLogString in class StoredProcedureCall
    • getArguments

      protected static List<PLSQLargument> getArguments(List<PLSQLargument> args, DatasourceCall.ParameterType direction)
      INTERNAL
      Returns:
      list of arguments with the specified direction
    • getSQL2PlName

      public String getSQL2PlName(ComplexDatabaseType type)
      Return the conversion function name, generate the function if missing.
    • isStoredPLSQLProcedureCall

      public boolean isStoredPLSQLProcedureCall()
      Overrides:
      isStoredPLSQLProcedureCall in class DatasourceCall
    • getPl2SQLName

      public String getPl2SQLName(ComplexDatabaseType type)
      Return the conversion function name, generate the function if missing.
    • getOutputParameterValue

      public Object getOutputParameterValue(CallableStatement statement, int index, AbstractSession session) throws SQLException
      Description copied from class: DatabaseCall
      INTERNAL: Get the return object from the statement. Use the parameter index to determine what return object to get.
      Overrides:
      getOutputParameterValue in class StoredProcedureCall
      Parameters:
      statement - SQL/JDBC statement to call stored procedure/function
      index - 0-based index in the argument list
      session - Active database session (in connected state).
      Throws:
      SQLException
    • getArguments

      public List<PLSQLargument> getArguments()
      Return the PLSQL arguments.
    • setArguments

      public void setArguments(List<PLSQLargument> arguments)
      Set the PLSQL arguments.