I am using http://www.mkyong.com/struts2/struts-2-hibernate-integration-with-full-hibernate-plugin/ as my refernce for struts+hibernate.I need to replace "return session.createQuery("from Customer").list();" in CustomerDAOIMPL.java with the following query
select u.Loginid,c.CID,CNAME,CTICKER,STOCKVALUE,VARIATE,VARIATE_PERCENT,PREVIOUS_DAY_STOCK,MARKET
from company_details c,users_details u,user_company uc where uc.loginpk=u.loginpk AND uc.CID=c.CID AND uc.loginpk IN (select LOGINPK from users_details where LOGINID="check")
how to do write such a query in HQL[Hibernate Query Language] I tried reading my tutorials for google but nothing go into my mind.Please help me,if possible give the link of tutorial for creating HQL from SQL involving Joining tables which is very simple to understand