| java.lang.Object | ||
| ↳ | net.sf.hibernate.id.TableGenerator | |
| ↳ | com.atlassian.hibernate.ResettableTableHiLoGenerator | |
A variant on Hibernate's HiLoGenerator that allows us to force a reload of the HI value. This is necessary because after an import or restore, the hi value in the generator may overlap with IDs already assigned in the database.
Note: calling reset() does not ensure that the hi value that we get from the database
is correct. If you've imported data with pre-set IDs you'll need something like Confluence's
HiLoIdRepairUpgradeTask to set the hi value to a sane value before resetting the generator.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | MAX_LO | The max_lo parameter | |||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
net.sf.hibernate.id.TableGenerator
| |||||||||||
From interface
net.sf.hibernate.id.PersistentIdentifierGenerator
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Get the max_lo value, so that we can calculate a vaid value for the next_hi DB value,
given the ids already allocated in the databse.
| |||||||||||
set the lo value to more than maxLo to force a reset of hival
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
net.sf.hibernate.id.TableGenerator
| |||||||||||||||||||||
From class
java.lang.Object
| |||||||||||||||||||||
From interface
net.sf.hibernate.id.Configurable
| |||||||||||||||||||||
From interface
net.sf.hibernate.id.IdentifierGenerator
| |||||||||||||||||||||
From interface
net.sf.hibernate.id.PersistentIdentifierGenerator
| |||||||||||||||||||||
| SQLException | |
|---|---|
| HibernateException |
Get the max_lo value, so that we can calculate a vaid value for the next_hi DB value, given the ids already allocated in the databse.
set the lo value to more than maxLo to force a reset of hival

