/** @see com.manpower.portal.mpnet.dao.interfaces.DAO#findByID(java.io.Serializable) */
  public Object findByID(Serializable id) {

    Session session = HibernateUtil.getCurrentSession();

    Object question = session.get(SteeringQuestion.class, id);

    return question;
  }
 public List<ApplicantSearchGeoCode> getApplicantGeoLocationsByIds(List<Long> idList) {
   // TODO Auto-generated method stub
   Session session = HibernateUtil.getCurrentSession();
   Criteria criteria = session.createCriteria(ApplicantSearchGeoCode.class);
   criteria.add(Restrictions.in("id", idList));
   criteria.addOrder(Order.asc("id"));
   List<ApplicantSearchGeoCode> results = criteria.list();
   return results;
 }
 public List<ApplicantSearchGeoCode> getApplicantGeoLocations(
     long siteId, int fromIndex, int toIndex) {
   // TODO Auto-generated method stub
   Session session = HibernateUtil.getCurrentSession();
   Criteria criteria = session.createCriteria(ApplicantSearchGeoCode.class);
   criteria.add(Restrictions.eq("siteId", Long.valueOf(siteId)));
   criteria.addOrder(Order.asc("id"));
   criteria.setFirstResult(fromIndex + 1);
   criteria.setMaxResults(toIndex - fromIndex + 1);
   List<ApplicantSearchGeoCode> results = criteria.list();
   return results;
 }
  /** Find legal questions by Site and language */
  public List findLegalQuestions(long siteId, String language) {

    Session session = HibernateUtil.getCurrentSession();

    Criteria query = session.createCriteria(SteeringQuestion.class);

    //	Alexander Todorov;
    //	We will search for specified language if it is not empty or null.
    //	Else we will search questions for a site.

    if (language != null && language.trim().length() > 0) {

      query.add(Restrictions.eq("language", language));
    }

    query.add(Restrictions.eq("siteId", new Long(siteId)));
    query.add(Restrictions.eq("questionType", "LGL"));
    query.addOrder(Order.asc("questionId"));
    return query.list();
  }
 /** @see com.manpower.portal.mpnet.dao.abstracts.DAOFactory#getCandidateEducationDAO() */
 public CandidateEducationDAO getCandidateEducationDAO() {
   Session session = com.manpower.j2ee.util.hibernate.HibernateUtil.getCurrentSession();
   return new CandidateEducationDAOHibernate(session);
 }
 /** @see com.manpower.portal.mpnet.dao.abstracts.DAOFactory#getAdvertisementDAO() */
 public AdvertisementDAO getAdvertisementDAO() {
   Session session = com.manpower.j2ee.util.hibernate.HibernateUtil.getCurrentSession();
   return new AdvertisementDAOHibernate(session);
 }
 /**
  * Get Hibernate session
  *
  * @return Current Hibernate session
  */
 protected Session getCurrentSession() {
   Session session = com.manpower.j2ee.util.hibernate.HibernateUtil.getCurrentSession();
   return session;
 }