return query.list(unmodifiable); query.setMaxResults(end - start); query.setFirstResult(start); return query.list(unmodifiable); ScrollableResults sr = query.scroll();
public void add(boolean value) { _query.setBoolean(_pos++, value); }
public void add(double value) { _query.setDouble(_pos++, value); }
q.setFirstResult(0); q.setMaxResults(2); List<DDMStructure> list = q.list();
for (Club club : (List<Club>)q.list()) { map.put(club.getPrimaryKeyObj(), club);
/** * Returns the number of ddm structure links. * * @return the number of ddm structure links */ @Override public int countAll() { Long count = (Long)finderCache.getResult(_finderPathCountAll, FINDER_ARGS_EMPTY, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_DDMSTRUCTURELINK); count = (Long)q.uniqueResult(); finderCache.putResult(_finderPathCountAll, FINDER_ARGS_EMPTY, count); } catch (Exception e) { finderCache.removeResult(_finderPathCountAll, FINDER_ARGS_EMPTY); throw processException(e); } finally { closeSession(session); } } return count.intValue(); }
public void add(float value) { _query.setFloat(_pos++, value); }
public void add(int value) { _query.setInteger(_pos++, value); }
public void add(long value) { _query.setLong(_pos++, value); }
ScrollableResults sr = query.scroll();
q.setFirstResult(0); q.setMaxResults(2); List<JournalArticle> list = q.list();
for (RosterMember rosterMember : (List<RosterMember>)q.list()) { map.put(rosterMember.getPrimaryKeyObj(), rosterMember);
/** * Returns the number of journal folders. * * @return the number of journal folders */ @Override public int countAll() { Long count = (Long)finderCache.getResult(_finderPathCountAll, FINDER_ARGS_EMPTY, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_JOURNALFOLDER); count = (Long)q.uniqueResult(); finderCache.putResult(_finderPathCountAll, FINDER_ARGS_EMPTY, count); } catch (Exception e) { finderCache.removeResult(_finderPathCountAll, FINDER_ARGS_EMPTY); throw processException(e); } finally { closeSession(session); } } return count.intValue(); }
public void add(Float value) { if (value != null) { _query.setFloat(_pos++, value.intValue()); } else { _addNull(); } }
public void add(Integer value) { if (value != null) { _query.setInteger(_pos++, value.intValue()); } else { _addNull(); } }
public void add(Long value) { if (value != null) { _query.setLong(_pos++, value.longValue()); } else { _addNull(); } }
public static List<?> randomList( Query query, Dialect dialect, int total, int num, boolean unmodifiable) { if ((total == 0) || (num == 0)) { return new ArrayList<Object>(); } if (num >= total) { return list(query, dialect, ALL_POS, ALL_POS, true); } int[] scrollIds = Randomizer.getInstance().nextInt(total, num); List<Object> list = new ArrayList<Object>(); ScrollableResults sr = query.scroll(); for (int i = 0; i < scrollIds.length; i++) { if (sr.scroll(scrollIds[i])) { Object obj = sr.get(0); list.add(obj); sr.first(); } } if (unmodifiable) { return new UnmodifiableList(list); } else { return list; } }
q.setFirstResult(0); q.setMaxResults(2); List<JournalArticle> list = q.list();
for (DDMFormInstance ddmFormInstance : (List<DDMFormInstance>)q.list()) { map.put(ddmFormInstance.getPrimaryKeyObj(), ddmFormInstance);
return query.list(unmodifiable); query.setMaxResults(end - start); query.setFirstResult(start); return query.list(unmodifiable); ScrollableResults sr = query.scroll();