Refactoring RD2RD
Closed this issue · 3 comments
naraesk commented
We have to refactor RD2RD in a similiar way to JQA2RD, i.e
- no more recursion, as less database queries as possible
- use the new classes disk, disksegment and model
- some methods of RD2RD should be member functions of this classes
- create tests
Lukasz-kal commented
Queries from database partially with objects and ArrayLists replaced.
naraesk commented
Further refactoring tasks
- rename all variables "netArea" to "areaWithoutBorder"
- rename all variables "grossArea" to "areaWithBorder"
- Disk and DiskSegment have one public method "writeToDatabase", not two (jqa2rdwriteToDatabase and rd2rdWriteToDatabase)
Lukasz-kal commented
Done: new Names for some variables and methods, new costructor for Disk, method sum removed from RD2RD to Disk, RDElements have now only one public method writeToDatabase, new structore f Disk and DiskSegments tests.
Ideas and question:
-subDisk method from Rd2Rd to DIsk and new ArrayList for that in DIsk
-should be attributes in queries to DB also renemed from netArea and grossArea to areWith(out)Border?
-class CircleWithInnerCircles uses a lot od attributes and methods from Disk, is it ok?
-calculateCrossSection belongs to RDElelemt not Rd2RD?