Create a CF Query Result Set in Java
I'd like to programatically build a ColdFusion query resultset inside of a Java class and return it to the calling application. See the Java psudocode below to see what I'm talking about:
public class MyClass {
public coldfusion.sql.QueryTable getQuery() {
// Create a query table object
QueryTable myTable = ..?
// Loop through some set of instance data for my class
for(int c = 0; c < this.myWigets.length; c++) {
int row = c+1;
myTable.setField(row, nameCol, this.myWigets
myTable.setField(row, colorCol, this.myWigets
}
return myTable;
}
}
I've had stuff like this partially working in the past but had issues with things like query of queries and such probably due to the hacks used to create the QueryTable object. I'm mainly just checking in to see if there has been any progress made in this area. To me this seems like such an obvious thing for a Java developer working within CF to want to do. I'm surprised Adobe doesn't have an officially supported API for doing this sort of thing (or maybe I'm just too dumb to find it.)
A few other notes... I'm not using CFX, and I'm not starting with a java.sql.ResultSet otherwise I would use the QueryTable(java.sql.ResultSet) constructor. I need to build this thing from scratch programatically.
Thanks for your time. I hope this question makes sense to someone out there.
- Mike
