jeudi 29 septembre 2016

Design pattern for db operations on list of tables in java

I need suggestion on designing one of the use case. I have multiple classes which are responsible for inserting data into multiple tables i.e for example ClassA is responsible for inserting data into Table1, Table2, Table3 and ClassB is responsible for inserting into Table4, Table5 etc. So for each of the table I have a pojo class now. I have classes which has the logic to populate these pojo classes. So each class has to know the tables it is mapped to and call the respective class which populate and then persist them. How we effectively design this whole thing.

Aucun commentaire:

Enregistrer un commentaire