List of usage examples for org.hibernate Criteria setFirstResult
public Criteria setFirstResult(int firstResult);
From source file:com.algoTrader.entity.security.FutureDaoBase.java
/** * {@inheritDoc}/* w w w .j a va 2 s . c om*/ */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(FutureImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.security.IntrestRateDaoBase.java
/** * {@inheritDoc}// www .ja v a2 s . c o m */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(IntrestRateImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.security.SecurityDaoBase.java
/** * {@inheritDoc}//www . j a v a 2 s .c om */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(SecurityImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.security.SecurityFamilyDaoBase.java
/** * {@inheritDoc}/*from ww w . ja va 2s . c o m*/ */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(SecurityFamilyImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.security.StockDaoBase.java
/** * {@inheritDoc}//from w w w . j a v a 2s . c o m */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(StockImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.security.StockOptionDaoBase.java
/** * {@inheritDoc}// www . j a v a 2 s. c o m */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(StockOptionImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.StrategyDaoBase.java
/** * {@inheritDoc}// w ww .j av a2s.co m */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(StrategyImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.trade.TrailingStopOrderDaoBase.java
/** * {@inheritDoc}//from w w w. j av a2s . c om */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(TrailingStopOrderImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.TransactionDaoBase.java
/** * {@inheritDoc}/* w w w .j av a2 s . c o m*/ */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(TransactionImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }
From source file:com.algoTrader.entity.WatchListItemDaoBase.java
/** * {@inheritDoc}//from w ww .j av a 2 s.co m */ @Override public Collection<?> loadAll(final int transform, final int pageNumber, final int pageSize) { try { final Criteria criteria = this.getSession(false).createCriteria(WatchListItemImpl.class); if (pageNumber > 0 && pageSize > 0) { criteria.setFirstResult(this.calculateFirstResult(pageNumber, pageSize)); criteria.setMaxResults(pageSize); } final Collection<?> results = criteria.list(); this.transformEntities(transform, results); return results; } catch (HibernateException ex) { throw super.convertHibernateAccessException(ex); } }