Example usage for org.springframework.jdbc.support.incrementer AbstractSequenceMaxValueIncrementer nextLongValue

List of usage examples for org.springframework.jdbc.support.incrementer AbstractSequenceMaxValueIncrementer nextLongValue

Introduction

In this page you can find the example usage for org.springframework.jdbc.support.incrementer AbstractSequenceMaxValueIncrementer nextLongValue.

Prototype

@Override
    public long nextLongValue() throws DataAccessException 

Source Link

Usage

From source file:org.pssframework.dao.BaseSpringJdbcDao.java

protected void insertWithSequence(Object entity, AbstractSequenceMaxValueIncrementer sequenceIncrementer,
        String insertSql) {//  ww  w.  ja v  a  2 s  .com
    Long id = sequenceIncrementer.nextLongValue();
    setIdentifierProperty(entity, id);
    getNamedParameterJdbcTemplate().update(insertSql, new BeanPropertySqlParameterSource(entity));
}