Class SqliteMaxValueIncrementer
java.lang.Object
org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer
org.springframework.jdbc.support.incrementer.AbstractColumnMaxValueIncrementer
org.springframework.jdbc.support.incrementer.SqliteMaxValueIncrementer
- All Implemented Interfaces:
InitializingBean, DataFieldMaxValueIncrementer
DataFieldMaxValueIncrementer that increments the maximum value of a given table with
the equivalent of an auto-increment column, using a SQLite select max(rowid) query.- Since:
- 7.0
- Author:
- Luke Taylor, Juergen Hoeller
-
Field Summary
Fields inherited from class AbstractDataFieldMaxValueIncrementer
paddingLength -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for bean property style usage.SqliteMaxValueIncrementer(DataSource dataSource, String incrementerName, String columnName) Convenience constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected longDetermine the next key to use, as a long.Methods inherited from class AbstractColumnMaxValueIncrementer
afterPropertiesSet, getCacheSize, getColumnName, setCacheSize, setColumnNameMethods inherited from class AbstractDataFieldMaxValueIncrementer
getDataSource, getIncrementerName, getPaddingLength, nextIntValue, nextLongValue, nextStringValue, setDataSource, setIncrementerName, setPaddingLength
-
Constructor Details
-
SqliteMaxValueIncrementer
public SqliteMaxValueIncrementer()Default constructor for bean property style usage.- See Also:
-
SqliteMaxValueIncrementer
Convenience constructor.- Parameters:
dataSource- the DataSource to useincrementerName- the name of the sequence/table to usecolumnName- the name of the column in the sequence table to use
-
-
Method Details
-
getNextKey
protected long getNextKey()Description copied from class:AbstractDataFieldMaxValueIncrementerDetermine the next key to use, as a long.- Specified by:
getNextKeyin classAbstractDataFieldMaxValueIncrementer- Returns:
- the key to use as a long. It will eventually be converted later in another format by the public concrete methods of this class.
-