Package io.ebean.config.dbplatform
Class SequenceIdGenerator
java.lang.Object
io.ebean.config.dbplatform.SequenceIdGenerator
- All Implemented Interfaces:
PlatformIdGenerator
- Direct Known Subclasses:
SequenceBatchIdGenerator,SequenceStepIdGenerator
Database sequence based IdGenerator.
-
Field Summary
Fields inherited from interface io.ebean.config.dbplatform.PlatformIdGenerator
AUTO_UUID -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the sequence name.abstract StringgetSql(int batchSize) booleanReturns true.Return the next Id.voidpreAllocateIds(int requestSize) If allocateSize is large load some sequences in a background thread.
-
Method Details
-
getSql
-
getName
Returns the sequence name.- Specified by:
getNamein interfacePlatformIdGenerator
-
isDbSequence
Returns true.- Specified by:
isDbSequencein interfacePlatformIdGenerator
-
preAllocateIds
If allocateSize is large load some sequences in a background thread.For example, when inserting a bean with a cascade on a OneToMany with many beans Ebean can call this to ensure .
- Specified by:
preAllocateIdsin interfacePlatformIdGenerator
-
nextId
Return the next Id.If a Transaction has been passed in use the Connection from it.
- Specified by:
nextIdin interfacePlatformIdGenerator
-