For the moment, I have the following code :
sql = "SELECT i.companyCode, i.fundSponsor FROM abpro.beans.Funds2 i WHERE i.fundCode = 'B91A' AND i.classCode = 'A'";
// create an HQL statement and execute
hql = session.createQuery(sql);
results = hql.scroll();
results.beforeFirst();
while(results.next())
{
System.out.println(results.get(0) + " - " + results.get(1));
}
With this code, I get the VALUE of the properties. But how do I get the property NAMES, in this case <companyCode> and <fundSponsor> without hardcoding it ? I.e I would like to have something like
<propertyName> : <propertyValue>
<propertyName> : <propertyValue>
.
.
Thanks in advance.
|