jpa-spec
  1. jpa-spec
  2. JPA_SPEC-2

Use of Parameter objects with StoredProcedureQuery

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      The issue was previously raised in email discussion by Rainer:

      Should we consider changing the return type of the register methods, as:

      <T> Parameter<T> registerStoredProcedureParameter(
                int position,
                Class<T> type,
                ParameterMode mode)
      
      <T> Parameter<T> registerStoredProcedureParameter(
                String parameterName,
                Class<T> type,
                ParameterMode mode)
      

      which would enable us to add a method

      <T> getOutputParameterValue(Parameter<T> param)
      

      We could then say that the usage of a Parameter<T> object other than the ones created by one of the register methods is undefined for a certain StoredProcedure.

      The change, and tradeoff to consider, is that the current registerStoredProcedureParameter methods return the StoredProcedureQuery object (which allows method chaining).

        Activity

        Hide
        ldemichiel added a comment -

        Consensus was to leave this as is, with support for chaining by return of StoredProcedureQuery object.

        Show
        ldemichiel added a comment - Consensus was to leave this as is, with support for chaining by return of StoredProcedureQuery object.

          People

          • Assignee:
            Unassigned
            Reporter:
            ldemichiel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: