When you select a particular column(s) from table using HQL, how do you handle the return result? what is the type of result will be returned?
Here is some example:
When you select a single object:
private List
return getHibernateTemplate().find("Select id.jid from MucAffiliation where id.room=? and affiliation=?",
new Object[] {room,affiliation});
}
Test code:
for(String key:loadAffiliationsbyCategory2(room, MucRole.Affiliation.outcast.getValue())){
log.debug("test " + key);
}
When you select more then one object:
private List
No comments:
Post a Comment