List of usage examples for org.hibernate FetchMode JOIN
FetchMode JOIN
To view the source code for org.hibernate FetchMode JOIN.
Click Source Link
From source file:com.inkubator.hrm.dao.impl.RecruitmenSelectionSeriesDetailDaoImpl.java
@Override public List<RecruitmenSelectionSeriesDetail> getAllDataBySelectionSeriesId(Long id, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("recruitmenSelectionSeries.id", id)); criteria.setFetchMode("recruitmenSelectionSeries", FetchMode.JOIN); criteria.setFetchMode("recruitSelectionType", FetchMode.JOIN); criteria.setFetchMode("recruitLettersByAcceptLetterId", FetchMode.JOIN); criteria.setFetchMode("recruitLettersByRejectLetterId", FetchMode.JOIN); criteria.addOrder(order);/*from w ww .j ava 2 s . com*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitmenSelectionSeriesDetailDaoImpl.java
@Override public RecruitmenSelectionSeriesDetail getEntityByPk(RecruitmenSelectionSeriesDetailId id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("id", id)); criteria.setFetchMode("recruitSelectionType", FetchMode.JOIN); return (RecruitmenSelectionSeriesDetail) criteria.uniqueResult(); }
From source file:com.inkubator.hrm.dao.impl.RecruitmenSelectionSeriesDetailDaoImpl.java
@Override public List<RecruitmenSelectionSeriesDetail> getListBySelectionSeriesId(Long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.createAlias("recruitmenSelectionSeries", "recruitmenSelectionSeries", JoinType.INNER_JOIN); criteria.add(Restrictions.eq("recruitmenSelectionSeries.id", id)); criteria.setFetchMode("recruitSelectionType", FetchMode.JOIN); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitSelectionTypeFieldDaoImpl.java
@Override public List<RecruitSelectionTypeField> getEntityByRecruitSelectionTypeId(Long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("recruitSelectionType.id", id)); criteria.setFetchMode("recruitSelectionType", FetchMode.JOIN); criteria.setFetchMode("recruitDynamicField", FetchMode.JOIN); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitSelectionTypeTemplatesDaoImpl.java
@Override public List<RecruitSelectionTypeTemplates> getByParentId(long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.createAlias("recruitSelectionTypeTemplates", "dp", JoinType.INNER_JOIN); criteria.add(Restrictions.eq("dp.id", id)); criteria.setFetchMode("recruitSelectionTypeTemplateses", FetchMode.JOIN); criteria.setFetchMode("recruitSelectionTypeTemplateses.recruitSelectionTypeTemplates", FetchMode.JOIN); criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitSelectionTypeTemplatesDaoImpl.java
@Override public RecruitSelectionTypeTemplates getByIdWithScore(long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("id", id)); criteria.setFetchMode("systemScoring", FetchMode.JOIN); return (RecruitSelectionTypeTemplates) criteria.uniqueResult(); }
From source file:com.inkubator.hrm.dao.impl.RecruitSelectionTypeTemplatesJobTitleDaoImpl.java
@Override public List<RecruitSelectionTypeTemplatesJobTitle> getByRecruitSelectionTypeTemplatesId(long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.createAlias("recruitSelectionTypeTemplates", "dp"); criteria.add(Restrictions.eq("dp.id", id)); criteria.addOrder(Order.desc("jabatan")); criteria.setFetchMode("recruitSelectionTypeTemplates", FetchMode.JOIN); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitVacancySelectionDaoImpl.java
@Override public List<RecruitVacancySelection> getByParam(RecruitVacancySelectionSearchParameter searchParameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchByParam(searchParameter, criteria); criteria.setFetchMode("recruitHireApply", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.jabatan", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.employeeType", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.recruitMppPeriod", FetchMode.JOIN); criteria.setFetchMode("recruitmenSelectionSeries", FetchMode.JOIN); criteria.addOrder(order);//from ww w . jav a 2s . c o m criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.RecruitVacancySelectionDaoImpl.java
@Override public RecruitVacancySelection getEntityByPkWithDetail(Long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("id", id)); criteria.setFetchMode("recruitHireApply", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.jabatan", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.employeeType", FetchMode.JOIN); criteria.setFetchMode("recruitHireApply.recruitMppPeriod", FetchMode.JOIN); criteria.setFetchMode("recruitmenSelectionSeries", FetchMode.JOIN); return (RecruitVacancySelection) criteria.uniqueResult(); }
From source file:com.inkubator.hrm.dao.impl.RecruitVacancySelectionDetailDaoImpl.java
@Override public List<RecruitVacancySelectionDetail> getAllDataByRecruitVacancySelection(Long id) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("recruitVacancySelection.id", id)); criteria.setFetchMode("recruitSelectionType", FetchMode.JOIN); return criteria.list(); }