com.github.drinkjava2.jdialects.id
Interface IdGenerator

All Known Implementing Classes:
AutoIdGenerator, IdentityIdGenerator, SequenceIdGenerator, SnowflakeGenerator, SortedUUIDGenerator, TableIdGenerator, TimeStampIdGenerator, UUID25Generator, UUID32Generator, UUID36Generator, UUIDAnyGenerator

public interface IdGenerator

Interface for all ID generators

Since:
1.0
Version:
1.0.0
Author:
Yong Zhu

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 newCopy()
          Return a newCopy (Deep Clone) instance
 

Method Detail

getNextID

Object getNextID(NormalJdbcTool jdbc,
                 Dialect dialect,
                 Type dataType)
Get the next ID generated by implementation of IdGenerator

Parameters:
jdbc - A NormalJdbcTool implementation to access database
dialect - The Dialect
dataType - The Type of a column
Returns:
id generated by IdGenerator

getGenerationType

GenerationType getGenerationType()
Return GenerationType


getIdGenName

String getIdGenName()
Return a unique Id Generator name in this TableModel


newCopy

IdGenerator newCopy()
Return a newCopy (Deep Clone) instance


dependOnAutoIdGenerator

Boolean dependOnAutoIdGenerator()
If depends on AutoIdGenerator, for example SortedUUIDGenerator depends on AutoIdGenerator to create start numbers



Copyright © 2018. All rights reserved.