Steve wrote:
The place where I work isn't ready to go to a framework and something
like a hibernate yet.
Why not? I think this would be the best solution. You don't have to
use a full enterprise suite, these frameworks function in isolation too.
I admit I haven't used Hibernate solo in a web app, but I understand
it's not hard to do.
Is there a design pattern for voluminous update and insert statements or
articles about how to handle these things in a less unwieldy way.
If you really can't use Hibernate (and I'd push as hard as I could for
it), then I think perhaps some sort of reflection would work. You'll
end up duplicating a fair chunk of Hibernate/JPA though.
Example, for any given class with some getters and setters:
1. Get the mapping for the table for that class.
2. Get the mapping for the fields for that class.
3. Read/Write the fields reflectively into rows.
You can either use annotations for the mapping, like modern JPA does, or
you can use some big ol' config file, like the older Hibernate/JPA
stuff. Either way, you're reinventing the wheel.
If you do use Hibernate, be sure to use it in its JPA incarnation and not old style. EclipseLink and OpenJPA are viable alternatives.
All are lightweight, if used correctly, and far less effort, cost and risk than reinventing the wheel.