Tuesday, January 04, 2005

Snapshot refactoring

Heres the step we figured out to create a snapshot out of an object that has date effective logic.

  • Create a superclass called XMaster and have X extend it.
  • Pull up the instance variables from class X
  • Encapsulate the local variables
  • Change the super class of X to Snapshot ( a class that contains the date context + a pointer to the master), and introduce a local variable of type XMaster (you will have compile errors)
  • Use the delegate refactoring in eclipse to generate the getters and setter for the master.
  • In the O/R layer rename the class descriptor for class X from "X" to "XMaster". Cleanup any broken mappings
  • Any other master objects that refer to "X" in the system must be changed to refer to "XMaster"

0 Comments:

Post a Comment

<< Home