Here's an example:
Code:
public BUSINESSORGANIZATION getBusinessOrganization(Integer businessOrgPK) {
BUSINESSORGANIZATION bOrg = null;
List list =
this.getHibernateTemplate().find
("from BUSINESSORGANIZATION bo where bo.id.BUS_ORG_PK = ?", businessOrgPK);
if (null != list && list.size() > 0)
{
bOrg = (BUSINESSORGANIZATION)list.get(0);
}
return bOrg;
}
The focal point is " where tableName.id.yourPK = ?...". I replaced my as400 tablename which was something like BHLKIKBO to class name BUSINESSORGANIZATION in the reveng.xml.