List of usage examples for org.hibernate Criteria setFirstResult
public Criteria setFirstResult(int firstResult);
From source file:com.inkubator.hrm.dao.impl.SchedulerLogDaoImpl.java
@Override public List<SchedulerLog> getByParam(SchedulerLogSearchParameter searchParameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchByParam(searchParameter, criteria); criteria.addOrder(order);/*from w ww . j ava 2 s . co m*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.SystemLetterReferenceDaoImpl.java
@Override public List<SystemLetterReference> getByParam(SystemLetterReferenceSearchParameter parameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchSystemLetterReferenceByParam(parameter, criteria); criteria.addOrder(order);/* w w w. ja va2s .co m*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.SystemScoringDaoImpl.java
@Override public List<SystemScoring> getByParam(SystemScoringSearchParameter searchParameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchByParam(searchParameter, criteria); criteria.addOrder(order);/*from ww w .j a v a 2s . co m*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.SystemScoringIndexDaoImpl.java
@Override public List<SystemScoringIndex> getAllByParam(Long systemScoringId, int firstResult, int maxResults, Order order) {// w w w . ja v a2 s . c o m Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.add(Restrictions.eq("systemScoring.id", systemScoringId)); criteria.addOrder(order); criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.TempAttendanceRealizationDaoImpl.java
@Override public List<TempAttendanceRealization> getByParam(TempAttendanceRealizationSearchParameter parameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchTempAttendanceRealizationByParam(parameter, criteria); criteria.addOrder(order);/*from ww w. j a va 2 s.c om*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); criteria.setFetchMode("empData", FetchMode.JOIN); criteria.setFetchMode("empData.jabatanByJabatanId", FetchMode.JOIN); criteria.setFetchMode("empData.bioData", FetchMode.JOIN); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.TempAttendanceRealizationDaoImpl.java
@Override public List<TempAttendanceRealization> getPaidOvertimeByParam(PaidOvertimeSearchParameter searchParameter, int firstResult, int maxResults, Order orderable) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearchPaidOvertimeByParam(searchParameter, criteria); criteria.addOrder(orderable);/* ww w. j a v a 2 s.c om*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.UnregSalaryDaoImpl.java
@Override public List<UnregSalary> getByParam(UnregSalarySearchParameter searchParameter, int firstResult, int maxResults, Order order) {/*from www . java2 s .c o m*/ Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.setFetchMode("wtPeriode", FetchMode.JOIN); doSearchByParam(searchParameter, criteria); criteria.addOrder(order); criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.UnregSalaryDaoImpl.java
@Override public List<UnregSalary> getByParamBySalaryCalculation(UnregSalarySearchParameter searchParameter, Date fromPeriodPayrollType, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.createAlias("wtPeriode", "wtPeriode", JoinType.INNER_JOIN); criteria.add(Restrictions.eq("isAlreadyPaid", false)); criteria.add(Restrictions.lt("wtPeriode.fromPeriode", fromPeriodPayrollType)); doSearchByParam(searchParameter, criteria); criteria.addOrder(order);/*www. j av a 2 s . c o m*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.UnregSalaryDaoImpl.java
@Override public List<UnregSalary> getByParamBySalaryPayroll(UnregSalarySearchParameter searchParameter, Date fromPeriodPayrollType, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); criteria.createAlias("wtPeriode", "wtPeriode", JoinType.INNER_JOIN); criteria.add(Restrictions.lt("wtPeriode.fromPeriode", fromPeriodPayrollType)); doSearchByParam(searchParameter, criteria); criteria.addOrder(order);/*from www . j a v a2 s.c o m*/ criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }
From source file:com.inkubator.hrm.dao.impl.WtFingerExceptionDaoImpl.java
@Override public List<WtFingerException> getByParamWithDetail(WtFingerExceptionSearchParameter searchParameter, int firstResult, int maxResults, Order order) { Criteria criteria = getCurrentSession().createCriteria(getEntityClass()); doSearch(searchParameter, criteria); criteria.setFetchMode("empData.employeeType", FetchMode.JOIN); criteria.addOrder(order);// w w w . j a va 2s. co m criteria.setFirstResult(firstResult); criteria.setMaxResults(maxResults); return criteria.list(); }