title: getting object from HQL query
body: <p>I am working on a project involving struts2 and hibernate.Actually I want to execute the select query below and store the values into a object of type Users.i tried using tostring(),querystring() methods all return only the query asa  string.I tried googling it said "HQL returns result in the form of objects" but i cant get the members of the class using query.how to get it please help thanks in advance</p>
  
  <pre><code>Query query=session.createQuery(" from Users where userid=:temp");
  query.setParameter("temp", "kumar");
  </code></pre>