We are dealing with a lot of CRUD operations in our application. Each database table has one or more corresponding SQLContainer instances to perform various types of operations. All of these SQLContainers are stored in one helper class, so that you could perform any type of CRUD operation anywhere from the program (once you have the reference to that helper class).
Now that the scale of the application is growing rapidly, this database helper class has also grown immensely (5+ KLOC). The growth of this helper class was impacted by the fact, that every SQLContainer has a seperate set of methods for performing the same operations, e.g. if you had to commit employeesContainer, you would call commitEmployeesContainer() and so only reading the method name gives a clear idea of the action. (You could call getEmployeesContainer().commit(), but we also perform some additional operations after commiting, like returing the status code of the commit which is almost the same for each container except for few containers)
Now we are considering to add some polymorphism to this helper class and create general purpose methods, e.g. for committing records the commitContainer(getEmployeesContainer()) could be used, but such polymorphism will have no typesafety whatsoever and if some table will have few different containers you could accidentally pass a wrong container.
One of the benefits is that you won't have to add new sets of methods when new SQLContainers will be added, and also modifications to the committing algorithm would be easier to adapt.
Question:
Which approach would ease the maintenance whilst keeping the readability or is there an alternative solution for this type of problem?