Why is half the stuff missing from JDBC 4.0 that was there?
I waited for killer things like the Queries and DataSets (iBatis goes BOOM!).
Although I would prefer that creating multi column data type would be there, instead of Queries and DataSets.
It would be nice to have something like:
@JdbcDataType
public class SomeData{
String a;
@Alias("c")
String b:
// Setters and getter and other stuff ......
}
PreparedStatement pst = connection.prepareStatement("SELECT a,c FROM SOME_COMPLEX_VIEW_OR_FUNCTION WHERE a= ?a AND b = ?c ");
pst.setObject(instanceOfSomeData);
ResultSet rs = pst.executeQuery();
while(rs.next()){
SomeData data = rs.getObject(SomeData.class);// And of course we need overloaded method
} // That takes a factory instance for objects
Simple, easy.
Saturday, February 03, 2007
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment