What SQL query? I see nothing that even looks remotely like it's database related. Do you perhaps want to create an SQL query? If so, TellTheDetails. What does the query need to do? What is the table to get data from? What does the table look like? Etc.
It looks like the getHomes() method of the Parent object may runs some SQL in order to get the results that you iterate through. Also, the Parent instance is created with an BcSQLAgent object passed to its constructor: "Parent p = new Parent(agt);". I suspect the BcSQLAgent contains some details about the DB connection, transaction, etc. and the Parent object uses that in order to run a query on the DB. What creates the BcSQLAgent object... where does it come from? If you have the source code for com.bc.util.BcSQLAgent and bcc.lib.dob.Parent, it may help to start looking there as well and figure out where Parent gets its SQL from. Perhaps from a .properties file, an .xml file, or from somewhere in the BcSQLAgent object. Maybe Parent and/or BcSQLAgent contain some methods that may reveal more details about its underlying SQL or other hints that may help you (i.e. toString() method, if that is implemented and not using the default one from java.lang.Object).