Open Norskan opened 8 years ago
I would propose the following, extracting all db functionallity into a interface so we can use a ServiceStub/Mockup DBFacade to ease unit testing.
On top of the DBFacade generalization i would propose to write DAO object for every domain object.
The DbFacade currently has specialized methodes to serialize and deserialize domain object. This leads to duplication of logic in the class.
Refactor the DbFacade to a more general implementation and add DAOs to access concrete objects
Also i would like to move the database connection configuration from the hibernate config file into a property file because the values are more connected to the underlying database technologie then hibernate. A CVS file would make it also simpler to edit this properties. We could even introduce a general applications config file for this purpose