Instead of using table_name you can use mapping class name in your hql.
so your line of code becomes
Code:
lender.setLicenses( (ArrayList) sess.createQuery(" from BankClLicense bcl where bcl.bnkClId = ? ").setParameter( 0, corrId ).list());
where BANK_CL_LICENSE_TABLE mapping class is BankClLicense and bnkClId is the property for the column BNK_CL_ID
However, if you want SQL itself, use createSQLQuery()
Code:
lender.setLicenses((ArrayList)sess.createSQLQuery("select * from "+LoanDBConstants.BANK_CL_LICENSE_TABLE+" where BNK_CL_ID='"+corrId+"'").list());