Spring Framework AbstractColumnMaxValueIncrementer - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractColumnMaxValueIncrementer class.

This code example shows how to use the following methods:
 * @since 3.0 
class SqliteMaxValueIncrementer extends AbstractColumnMaxValueIncrementer { 
	public SqliteMaxValueIncrementer(DataSource dataSource, String incrementerName, String columnName) { 
		super(dataSource, incrementerName, columnName); 
	/* (non-Javadoc) 
	 * @see org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer#getNextKey() 
	protected long getNextKey() { 
		Connection con = DataSourceUtils.getConnection(getDataSource()); 
		Statement stmt = null; 
		try { 
			stmt = con.createStatement(); 
			DataSourceUtils.applyTransactionTimeout(stmt, getDataSource()); 
			stmt.executeUpdate("insert into " + getIncrementerName() + " values(null)"); 
			ResultSet rs = stmt.executeQuery("select max(rowid) from " + getIncrementerName()); 
Connect your IDE to all the code out there  Get Codota for Java