class SequenceIdGenService {

	public List<Long> idSeqGen(int rsSize, String seqName) {

		String query = "SELECT NEXTVAL('" + seqName + "') FROM GENERATE_SERIES(1,?)";
		List<Long> ids = null;
		try {
			ids = jdbcTemplate.queryForList(query, new Object[] { rsSize }, Long.class);
			log.debug("Generated Ids:: " + ids + " for Sequence: " + seqName);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return ids;
	}

}