org.springframework.jdbc.support.incrementer

Class AbstractIdentityColumnMaxValueIncrementer

    • Method Detail

      • setDeleteSpecificValues

        public void setDeleteSpecificValues(boolean deleteSpecificValues)
        Specify whether to delete the entire range below the current maximum key value (false - the default), or the specifically generated values (true). The former mode will use a where range clause whereas the latter will use an in clause starting with the lowest value minus 1, just preserving the maximum value.
      • isDeleteSpecificValues

        public boolean isDeleteSpecificValues()
        Return whether to delete the entire range below the current maximum key value (false - the default), or the specifically generated values (true).
      • getIncrementStatement

        protected abstract java.lang.String getIncrementStatement()
        Statement to use to increment the "sequence" value.
        Returns:
        the SQL statement to use
      • getIdentityStatement

        protected abstract java.lang.String getIdentityStatement()
        Statement to use to obtain the current identity value.
        Returns:
        the SQL statement to use
      • getDeleteStatement

        protected java.lang.String getDeleteStatement(long[] values)
        Statement to use to clean up "sequence" values.

        The default implementation either deletes the entire range below the current maximum value, or the specifically generated values (starting with the lowest minus 1, just preserving the maximum value) - according to the isDeleteSpecificValues() setting.

        Parameters:
        values - the currently generated key values (the number of values corresponds to AbstractColumnMaxValueIncrementer.getCacheSize())
        Returns:
        the SQL statement to use