I am working on a project in java interfacing with mysql via JDBC. Currently all sql calls are literally inlined sql. The are large sql calls, with lots of left joins, and hideous to read or parse.
I wanted to clean this up to be a little more elegant. I will be adding a limit/offset argument and a WHERE clause that filters on date for multiple columns (I'm thinking a generic method where I can add an arbitrary number of date columns to be filtered on).
I'm trying to figure out a simple tool to avoid inlined sql. Hibernate seems inappropriate for this need, the sql queries are too complex and too optimized to replace with hibernate. I figure I instead want something that simple allows me to add request to a query (LIKE A JOIN or an additional WHERE) without modifying sql calls directly. Can anyone suggest a simple java tool for this?