This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I'm looking for a library that manipulates SQL statements, something along the lines of:
It's for an application where the same data is being looked at by users with various combinations of permissions and preferences, so there's a core query that stays the same, with rows and columns added or taken away for specific invocations. The other thing I'd like to be able to do is something like:
It's simple, it must have been done before, but my Google queries (eg "java sql") are unsuccessful. Thanks for any help. -- Donal
Hello again, Thanks Michael for the pointer to Torque, which I tried and liked. The best way of summarising its convenience is that Torque is to accessing databases as RMI is to accessing services over the network: it compiles database peer classes that represent information held in a database, saving the tedium of coding accessor methods and data conversions by hand, and hiding the conceptual mismatches of objects communicating with things that aren't objects. However I have a doubt about whether Torque is appropriate for my application, which doesn't do much more than extracting tabular information from a database and displaying the same tabular information to the user. I don't know if it's worth converting each row in a table to an object of a specially compiled class when this object doesn't encapsulate any business functionality and doesn't participate in any interactions apart from getXxx and setXxx. The small amount of intelligence in my application seems to be focussed on constructing queries and views of tabular data, so I'm looking for a class library that represents those concepts rather than hiding them. The Torque Criteria class looks like what I want, except I can't see any way of using it except by passing it to a Torque-generated database peer object, which I don't want.