|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.dbplatform.SequenceIdGenerator
public abstract class SequenceIdGenerator
Database sequence based IdGenerator.
Field Summary |
---|
Fields inherited from interface com.avaje.ebean.config.dbplatform.IdGenerator |
---|
AUTO_UUID |
Constructor Summary | |
---|---|
SequenceIdGenerator(BackgroundExecutor be,
DataSource ds,
String seqName,
int batchSize)
Construct given a dataSource and sql to return the next sequence value. |
Method Summary | |
---|---|
String |
getName()
Returns the sequence name. |
abstract String |
getSql(int batchSize)
|
boolean |
isDbSequence()
Returns true. |
Object |
nextId()
Return the next Id. |
void |
preAllocateIds(int allocateSize)
If allocateSize is large load some sequences in a background thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequenceIdGenerator(BackgroundExecutor be, DataSource ds, String seqName, int batchSize)
Method Detail |
---|
public abstract String getSql(int batchSize)
public String getName()
getName
in interface IdGenerator
public boolean isDbSequence()
isDbSequence
in interface IdGenerator
public void preAllocateIds(int allocateSize)
For example, when inserting a bean with a cascade on a OneToMany with many beans Ebean can call this to ensure .
preAllocateIds
in interface IdGenerator
public Object nextId()
nextId
in interface IdGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |