org.pfsw.db.util
Interface IdGeneratorCategorySpec

All Known Implementing Classes:
DefaultIdGeneratorCategorySpec

public interface IdGeneratorCategorySpec

A definition of an ID generator for a specific category.


Method Summary
 int getBlockSize()
          Returns the block size to be reserved for in-memory incrementing.
 java.lang.String getCategoryName()
          Returns the unique category name.
 java.lang.String getIdPrefix()
          Returns a string that must be used as prefix of any generated ID's string representation or null if no prefix is wanted.
 int getLength()
          Returns the length of the IDs.
 char getPaddingChar()
          Returns the character to be used for filling up generated IDs to a common fixed length.
 long getStartId()
          Returns the initial identifier value to start generation with.
 

Method Detail

getCategoryName

java.lang.String getCategoryName()
Returns the unique category name.


getStartId

long getStartId()
Returns the initial identifier value to start generation with.


getBlockSize

int getBlockSize()
Returns the block size to be reserved for in-memory incrementing.


getLength

int getLength()
Returns the length of the IDs. If the length is greater than zero it means that the string representation of the ID will be left padded with the padding character to the required length.

See Also:
getPaddingChar()

getPaddingChar

char getPaddingChar()
Returns the character to be used for filling up generated IDs to a common fixed length.

See Also:
getLength().

getIdPrefix

java.lang.String getIdPrefix()
Returns a string that must be used as prefix of any generated ID's string representation or null if no prefix is wanted.