Details

    • Number of attachments :
      2

      Description

      Amend JDOClassDescriptorResolver(Impl) to use .castor.cdr files for resolution for packages specified through addPackage().

      1. patch.c2452.20080721.txt
        17 kB
        Sebastian Gabmeyer
      2. patch.c2452.20080722.txt
        17 kB
        Sebastian Gabmeyer

        Activity

        Hide
        Sebastian Gabmeyer added a comment -

        This patch enables Castor to load JDODescriptors via a Class Descriptor Resolution File (cdr). The name of the file (.castor.jdo.cdr) is defined in the JDOConstants interface (see CASTOR-2445). A ResoultionNature is added to support the adding of packages to ClassDescriptorResolutionCommand (in this case the ClassResoultionByCDR class).
        The ClassResolutionByCDR adds a getDescriptors(String packageName) method which is not present in the supertype, so a cast is needed to properly compile this (e.g. ((ClassResolutionByCDR) ClassDescriptorResolutionCommand).getDescriptors(packageName)) which is not too beautiful but it works. Any ideas are most welcomed.
        A test case is included. Please note the TODO's before committing this code.

        Show
        Sebastian Gabmeyer added a comment - This patch enables Castor to load JDODescriptors via a Class Descriptor Resolution File (cdr). The name of the file ( .castor.jdo.cdr ) is defined in the JDOConstants interface (see CASTOR-2445 ). A ResoultionNature is added to support the adding of packages to ClassDescriptorResolutionCommand (in this case the ClassResoultionByCDR class). The ClassResolutionByCDR adds a getDescriptors(String packageName) method which is not present in the supertype, so a cast is needed to properly compile this (e.g. ((ClassResolutionByCDR) ClassDescriptorResolutionCommand).getDescriptors(packageName) ) which is not too beautiful but it works. Any ideas are most welcomed. A test case is included. Please note the TODO 's before committing this code.
        Hide
        Sebastian Gabmeyer added a comment -

        Just realized a bug in the test code, tests pass now.

        Show
        Sebastian Gabmeyer added a comment - Just realized a bug in the test code, tests pass now.

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            Werner Guttmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 hour
              1h
              Remaining:
              Time Spent - 45 minutes Remaining Estimate - 15 minutes
              15m
              Logged:
              Time Spent - 45 minutes Remaining Estimate - 15 minutes
              45m