public List<SliderTipSeg> getSliderTipSegById(int idTipSeg) { try { Dao<SliderTipSeg, Integer> dao = getHelper().getSliderTipSegDao(); QueryBuilder<SliderTipSeg, Integer> builder = dao.queryBuilder(); builder.setWhere(builder.where().eq("id_tipseg", idTipSeg)); builder.orderBy("order", true); List<SliderTipSeg> items = dao.query(builder.prepare()); return items; } catch (SQLException e) { e.printStackTrace(); } return null; }
public CloseableIterator<PlayerWarnData> findWarnings(long fromTime) throws SQLException { if (fromTime == 0) { return iterator(); } long checkTime = fromTime + DateUtils.getTimeDiff(); QueryBuilder<PlayerWarnData, Integer> query = queryBuilder(); Where<PlayerWarnData, Integer> where = query.where(); where.ge("created", checkTime); query.setWhere(where); return query.iterator(); }