title: Hibernate Help required
body: <p>I tried to look around for information regarding returning a list using Hibnerate but couldn't find something that matches what I'm looking for and thus needs some advise.</p>
  
  <p>I have the following classes</p>
  
  <p><strong>BPDataPK:</strong>  </p>
  
  <pre><code>  public class BPDataPK implements Serializable {
      private String id;
      private int userProfile;
      private Date when;      
           .....
    }
  </code></pre>
  
  <p><strong>BPData:</strong>  </p>
  
  <pre><code>public class BPData implements Serializable {   
     private BPDataPK dataPK;
     private Date sessionStart;
      ...
  }
  </code></pre>
  
  <p><strong>HibernateBPDataDAO :</strong></p>
  
  <pre><code>public class HibernateBPDataDAO extends HibernateDaoSupport implements IBPDataDAO{
      ....
  public BPData[] getSessionBPData(Session session) throws Exception {
          /**I need to get a list of BPData that matches the following
          1.  BPDataPK.id== session.getID;
          2.  BPDataPK.userProfile == session.getUserProfile;
          **3.  BPData.sessionStart  == session.getSessionStart();**
          */
      }
   }
  </code></pre>
  
  <p>How do I return a list of BPData that matches two of the primary key and a non primary key??</p>