net.toften.jlips.persist.db.pk
Interface PrimaryKeyHandler

All Known Implementing Classes:
IntegerPrimaryKeyHandler

public interface PrimaryKeyHandler

Interface used for providing handlers for primary keys. To separate the primary key from the Table handler, the primary keys are handled by a separate class. This class must implement this interface. The PrimatyKeyHandler provides the TableHandler with a number of services related to the primary key of a record

Author:
thomas

Method Summary
 DBTableColumnInfo getColumnInfo()
          Return the column info for the column that holds the primary key
 Object getLastPrimaryKey()
          Returns the last used primary key This might not have any meaning for certain types of primary key types
 Object getNextPrimaryKey()
          Returns the next available primary key for creation of a new record The method of generating a new unique primary key is up to the individual primary key handler
 DBTableInfo getTableInfo()
          Return the table info for the table the primary key handler is used by
 

Method Detail

getNextPrimaryKey

Object getNextPrimaryKey()
Returns the next available primary key for creation of a new record The method of generating a new unique primary key is up to the individual primary key handler

Returns:
new unique primary key

getLastPrimaryKey

Object getLastPrimaryKey()
Returns the last used primary key This might not have any meaning for certain types of primary key types

Returns:
the last used primary key

getTableInfo

DBTableInfo getTableInfo()
Return the table info for the table the primary key handler is used by

Returns:
table info for handled table

getColumnInfo

DBTableColumnInfo getColumnInfo()
Return the column info for the column that holds the primary key

Returns: