Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-777

Adding overloaded methods to JDOQLTypedQuery: numericParameter, collectionParameter, mapParameter, and listParameter

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JDO 3.1
    • JDO 3.2
    • api
    • None

    Description

      Class JDOQLTypedQuery provides a method to create a numeric patameter for a query:

      NumericExpression<?> numericParameter(String name);

      This signature does not support the creation of a numeric parameter of type NumericExpression<Double> that is then used in methods like lt or gt taking a double field as an argument.

      I propose to add an overloaded method with the following signature:

      <N> NumericExpression<N> numericParameter(Class<N> type, String name);

      I propose a corresponding extension for methods collectionParameter, mapParameter and listParameter:

      <E> CollectionExpression<Collection<E>, E> collectionParameter(Class<E> elementType, String name);

      <K,V> MapExpression<Map<K,V>, K, V> mapParameter(Class<K> keyType, Class<V> valueType, String name);

      <E> ListExpression<List<E>, E> listParameter(Class<E> elementType, String name);

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mbo Michael Bouschen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                Slack

                  Issue deployment