@Test public void test_getIds() { sequenceGenService.getIds(1, Sequence.CURRENTVALUESEQUENCE.toString()); }
public List<Long> getIds(int rsSize, String sequenceName) { String demandIdQuery = "SELECT NEXTVAL('" + sequenceName + "') FROM GENERATE_SERIES(1,?)"; List<Long> idList = null; try { idList = jdbcTemplate.queryForList(demandIdQuery, new Object[] { rsSize }, Long.class); } catch (Exception e) { log.error("the exception from demand ID gen : " + e); throw e; } return idList; }
SequenceGenService { public List<Long> getIds(int rsSize, String sequenceName) { String demandIdQuery = "SELECT NEXTVAL('" + sequenceName + "') FROM GENERATE_SERIES(1,?)"; List<Long> idList = null; try { idList = jdbcTemplate.queryForList(demandIdQuery, new Object[] { rsSize }, Long.class); } catch (Exception e) { log.error("the exception from demand ID gen : " + e); throw e; } return idList; } }
SequenceGenService { public List<Long> getIds(int rsSize, String sequenceName) { String demandIdQuery = "SELECT NEXTVAL('" + sequenceName + "') FROM GENERATE_SERIES(1,?)"; List<Long> idList = null; try { idList = jdbcTemplate.queryForList(demandIdQuery, new Object[] { rsSize }, Long.class); } catch (Exception e) { log.error("the exception from demand ID gen : " + e); throw e; } return idList; }  }
SequenceGenService { public List<Long> getIds(int rsSize, String sequenceName) { String demandIdQuery = "SELECT NEXTVAL('" + sequenceName + "') FROM GENERATE_SERIES(1,?)"; List<Long> idList = null; try { idList = jdbcTemplate.queryForList(demandIdQuery, new Object[] { rsSize }, Long.class); } catch (Exception e) { log.error("the exception from demand ID gen : " + e); throw e; } return idList; }  List<Long> getIds(int rsSize, String sequenceName); }
SequenceGenService { public List<Long> getIds(int rsSize, String sequenceName) { String demandIdQuery = "SELECT NEXTVAL('" + sequenceName + "') FROM GENERATE_SERIES(1,?)"; List<Long> idList = null; try { idList = jdbcTemplate.queryForList(demandIdQuery, new Object[] { rsSize }, Long.class); } catch (Exception e) { log.error("the exception from demand ID gen : " + e); throw e; } return idList; }  List<Long> getIds(int rsSize, String sequenceName);  }