com.github.drinkjava2.jdialects.id
Class TableIdGenerator

java.lang.Object
  extended by com.github.drinkjava2.jdialects.id.TableIdGenerator
All Implemented Interfaces:
IdGenerator

public class TableIdGenerator
extends Object
implements IdGenerator

The platform-independent table model

Since:
1.0.2
Author:
Yong Zhu

Constructor Summary
TableIdGenerator()
           
TableIdGenerator(String name, String table, String pkColumnName, String valueColumnName, String pkColumnValue, Integer initialValue, Integer allocationSize)
           
 
Method Summary
 Boolean dependOnAutoIdGenerator()
          If depends on AutoIdGenerator, for example SortedUUIDGenerator depends on AutoIdGenerator to create start numbers
 Integer getAllocationSize()
           
 GenerationType getGenerationType()
          Return GenerationType
 String getIdGenName()
          Return a unique Id Generator name in this TableModel
 Integer getInitialValue()
           
 String getName()
           
 Object getNextID(NormalJdbcTool jdbc, Dialect dialect, Type dataType)
          Get the next Table Generator ID
 String getPkColumnName()
           
 String getPkColumnValue()
           
 String getTable()
           
 String getValueColumnName()
           
 IdGenerator newCopy()
          Return a newCopy (Deep Clone) instance
 void setAllocationSize(Integer allocationSize)
           
 void setInitialValue(Integer initialValue)
           
 void setName(String name)
           
 void setPkColumnName(String pkColumnName)
           
 void setPkColumnValue(String pkColumnValue)
           
 void setTable(String table)
           
 void setValueColumnName(String valueColumnName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableIdGenerator

public TableIdGenerator()

TableIdGenerator

public TableIdGenerator(String name,
                        String table,
                        String pkColumnName,
                        String valueColumnName,
                        String pkColumnValue,
                        Integer initialValue,
                        Integer allocationSize)
Method Detail

newCopy

public IdGenerator newCopy()
Description copied from interface: IdGenerator
Return a newCopy (Deep Clone) instance

Specified by:
newCopy in interface IdGenerator

getGenerationType

public GenerationType getGenerationType()
Description copied from interface: IdGenerator
Return GenerationType

Specified by:
getGenerationType in interface IdGenerator

getIdGenName

public String getIdGenName()
Description copied from interface: IdGenerator
Return a unique Id Generator name in this TableModel

Specified by:
getIdGenName in interface IdGenerator

dependOnAutoIdGenerator

public Boolean dependOnAutoIdGenerator()
Description copied from interface: IdGenerator
If depends on AutoIdGenerator, for example SortedUUIDGenerator depends on AutoIdGenerator to create start numbers

Specified by:
dependOnAutoIdGenerator in interface IdGenerator

getNextID

public Object getNextID(NormalJdbcTool jdbc,
                        Dialect dialect,
                        Type dataType)
Get the next Table Generator ID

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

getName

public String getName()

setName

public void setName(String name)

getTable

public String getTable()

setTable

public void setTable(String table)

getPkColumnName

public String getPkColumnName()

setPkColumnName

public void setPkColumnName(String pkColumnName)

getValueColumnName

public String getValueColumnName()

setValueColumnName

public void setValueColumnName(String valueColumnName)

getPkColumnValue

public String getPkColumnValue()

setPkColumnValue

public void setPkColumnValue(String pkColumnValue)

getInitialValue

public Integer getInitialValue()

setInitialValue

public void setInitialValue(Integer initialValue)

getAllocationSize

public Integer getAllocationSize()

setAllocationSize

public void setAllocationSize(Integer allocationSize)


Copyright © 2018. All rights reserved.