|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.drinkjava2.jdialects.id.AutoIdGenerator
public class AutoIdGenerator
AutoGenerator will depends database's id generator mechanism like MySql's Identity, Oracle's Sequence...
| Field Summary | |
|---|---|
static AutoIdGenerator |
INSTANCE
|
static SequenceIdGenerator |
SEQ_AUTOID_INSTANCE
|
static TableIdGenerator |
TABLE_AUTOID_INSTANCE
|
| Constructor Summary | |
|---|---|
AutoIdGenerator()
|
|
| Method Summary | |
|---|---|
Boolean |
dependOnAutoIdGenerator()
If depends on AutoIdGenerator, for example SortedUUIDGenerator depends on AutoIdGenerator to create start numbers |
GenerationType |
getGenerationType()
Return GenerationType |
String |
getIdGenName()
Return a unique Id Generator name in this TableModel |
Object |
getNextID(NormalJdbcTool jdbc,
Dialect dialect,
Type dataType)
Get the next ID generated by implementation of IdGenerator |
IdGenerator |
getSequenceOrTableIdGenerator(Dialect dialect)
If dialect support sequence, return a SequenceIdGenerator, otherwise return a TableIdGenerator |
IdGenerator |
newCopy()
Return a newCopy (Deep Clone) instance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final AutoIdGenerator INSTANCE
public static final TableIdGenerator TABLE_AUTOID_INSTANCE
public static final SequenceIdGenerator SEQ_AUTOID_INSTANCE
| Constructor Detail |
|---|
public AutoIdGenerator()
| Method Detail |
|---|
public GenerationType getGenerationType()
IdGenerator
getGenerationType in interface IdGeneratorpublic String getIdGenName()
IdGenerator
getIdGenName in interface IdGeneratorpublic IdGenerator newCopy()
IdGenerator
newCopy in interface IdGeneratorpublic Boolean dependOnAutoIdGenerator()
IdGenerator
dependOnAutoIdGenerator in interface IdGenerator
public Object getNextID(NormalJdbcTool jdbc,
Dialect dialect,
Type dataType)
IdGenerator
getNextID in interface IdGeneratorjdbc - A NormalJdbcTool implementation to access databasedialect - The DialectdataType - The Type of a column
public IdGenerator getSequenceOrTableIdGenerator(Dialect dialect)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||