javatools.db
Class DbSequence

java.lang.Object
  |
  +--javatools.db.DbSequence

public class DbSequence
extends java.lang.Object

Generates unique values for use as keys. Constructor is not public. Use DbDatabase.getSequence().


Method Summary
 int next()
          Gets the next value.
 int next(DbConnection dbcon)
          Returns the next value, with a specific connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

next

public int next()
         throws DbException
Gets the next value.

Returns:
The requested value.
Throws:
DbException - If something goes wrong.

next

public int next(DbConnection dbcon)
         throws DbException
Returns the next value, with a specific connection.

Parameters:
dbcon - The connection to use.
Returns:
The needed value.
Throws:
DbException - If something goes wrong.