Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1335

Refactor all domain objects to utilize base interfaces

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Recently, we have introduced a number of new base interfaces and abstract classes as a part of refactoring effort. The intention is that all, or nearly all, OpenMRS domain objects should extend or implement one of these classes. It should be pretty clear what should be done - here is an example of what might be required for, say, org.openmrs.Location:

      • extends BaseOpenmrsMetadata
      • get/set id - delegate to get/set locationId
      • get/set name/description - remove these methods and private variables from class (as they are implemented in BaseOpenmrsMetadata class)
      • get/set creator,createdBy,retiredBy,retired,dateRetired,retireReason - remove all of these properties, remove all getters and setters methods as they are duplicated in BaseOpenmrsMetadata.
      • If any of the above methods are named slightly different in the object you are refactoring, change the implementation of the getter/setter method to delegate to the method implemented in the BaseOpenmrsMetadata class.

      More details to follow on which domain objects should be mapped to which base classes and interfaces.

        Attachments

        1. DomainObjectRefactor_April10.patch
          15 kB
        2. DomainObjectRefactor.patch
          178 kB
        3. DomainObjects.patch
          15 kB
        4. LocationExtendsBaseOpenmrsMetadata.patch
          4 kB

          Activity

            People

            Assignee:
            joutsource J. Outsource [X] (Inactive)
            Reporter:
            mseaton Mike Seaton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: