Spring Data Commons
  1. Spring Data Commons
  2. DATACMNS-66

Provide infrastructure to parse IgnoreCase from query methods

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: 1.2 M1
    • Component/s: Repositories
    • Labels:
      None

      Description

      Ticket to capture changes in Spring Data Commons necessary to implement DATAJPA-92.

        Issue Links

          Activity

          Hide
          Oliver Gierke added a comment -

          The major classes to take a look at are PartTree and Part. The former probably will have to be adapted to enable AllIgnoringCase. We probably have to overhaul it to a larger degree as we now have two special clauses a query method name can end with (OrderBy and AllIgnoringCase|AllIgnoreCase) probably might be better to parse both of them using a regular expression that manually splitting the method name. In AbstractQueryCreator we probably should make the PartTree available to subclasses to allow accessing the method global ignore case flag. For the Part class the only necessary change I think should be the constructor that has to check for the given String ending with the keyword and setting a flag accordingly. The accessor for the flag should already take into account that only String based properties can be handled ignoring case.

          Show
          Oliver Gierke added a comment - The major classes to take a look at are PartTree and Part . The former probably will have to be adapted to enable AllIgnoringCase . We probably have to overhaul it to a larger degree as we now have two special clauses a query method name can end with ( OrderBy and AllIgnoringCase|AllIgnoreCase ) probably might be better to parse both of them using a regular expression that manually splitting the method name. In AbstractQueryCreator we probably should make the PartTree available to subclasses to allow accessing the method global ignore case flag. For the Part class the only necessary change I think should be the constructor that has to check for the given String ending with the keyword and setting a flag accordingly. The accessor for the flag should already take into account that only String based properties can be handled ignoring case.
          Hide
          Oliver Gierke added a comment -

          Thanks for the contributions, Phil!

          Show
          Oliver Gierke added a comment - Thanks for the contributions, Phil!

            People

            • Assignee:
              Oliver Gierke
              Reporter:
              Oliver Gierke
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: