Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-343

Implement a central registry for peerImpls like the registry for managers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0
    • 5.0
    • Runtime, Templates
    • None

    Description

      I'd like to suggest a central registry for peerImpl-objects which can be queried by the Persistent class it is responsible for. This would allow reusing and extending the peer objects dynamically as well as giving them some kind of life-cycle.

      The main method would be similar to this:

      public <T> BasePeerImpl<T> getPeerFor(Class<T> persistentClass)
      {
          return peerRegistry.get(persistentClass);
      }
      

      I would also like to suggest moving the buildCriteria(obj) method to the RecordMapper or the TableMap class. This will further reduce the amount of code that needs to be generated.

      If the idea is received well, I'll come up with a proposal.

      Attachments

        Activity

          People

            tv Thomas Vandahl
            tv Thomas Vandahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: