Package org.springframework.jdbc.support.incrementer

Examples of org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer.afterPropertiesSet()


    PostgreSQLSequenceMaxValueIncrementer incrementer = new PostgreSQLSequenceMaxValueIncrementer();
    incrementer.setDataSource(ds);
    incrementer.setIncrementerName("myseq");
    incrementer.setPaddingLength(5);
    incrementer.afterPropertiesSet();

    assertEquals("00010", incrementer.nextStringValue());
    assertEquals(12, incrementer.nextIntValue());

    dsControl.verify();
View Full Code Here


    PostgreSQLSequenceMaxValueIncrementer incrementer = new PostgreSQLSequenceMaxValueIncrementer();
    incrementer.setDataSource(dataSource);
    incrementer.setIncrementerName("myseq");
    incrementer.setPaddingLength(5);
    incrementer.afterPropertiesSet();

    assertEquals("00010", incrementer.nextStringValue());
    assertEquals(12, incrementer.nextIntValue());

    verify(resultSet, times(2)).close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.