List of usage examples for org.springframework.jdbc.support.incrementer DataFieldMaxValueIncrementer DataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer
From source file:org.kuali.kra.bo.SponsorMaintainableImplTest.java
@Before public void setUp() throws Exception { parameterService = new ParameterServiceMock(); sponsorMaintainableImpl = new SponsorMaintainableImpl(); sponsorMaintainableImpl.setBoClass(Sponsor.class); sponsorMaintainableImpl.setBusinessObject(new Sponsor()); sponsorMaintainableImpl.setParameterService(parameterService); sponsorMaintainableImpl.setSponsorCodeIncrementer(new DataFieldMaxValueIncrementer() { int i = 0; @Override/*w w w. ja v a2s . c o m*/ public int nextIntValue() throws DataAccessException { return i++; } @Override public long nextLongValue() throws DataAccessException { return i++; } @Override public String nextStringValue() throws DataAccessException { return String.valueOf(i++); } }); }