|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anthonyeden.lib.db.UniqueIDGenerator
Unique ID generator which retrieves and increments a unique integer, prefix and suffix from a database.
| Constructor Summary | |
UniqueIDGenerator(java.sql.Connection connection)
Create a new UniqueIDGenerator using the given JDBC connection. |
|
UniqueIDGenerator(LockManager lockManager,
java.sql.Connection connection)
Create a new UniqueIDGenerator using the given LockManager and JDBC connection. |
|
| Method Summary | |
void |
createIdType(java.lang.String type,
java.lang.String prefix,
java.lang.String suffix,
int initialValue)
Add an ID type to the database. |
java.lang.String |
generateId(java.lang.String type)
Generate the specified ID type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public UniqueIDGenerator(java.sql.Connection connection)
throws java.sql.SQLException
connection - The JDBC connection
java.sql.SQLException
public UniqueIDGenerator(LockManager lockManager,
java.sql.Connection connection)
throws java.sql.SQLException
lockManager - The lock managerconnection - The JDBC connection
java.sql.SQLException| Method Detail |
public java.lang.String generateId(java.lang.String type)
throws java.lang.Exception
type - A type String
java.lang.Exception
public void createIdType(java.lang.String type,
java.lang.String prefix,
java.lang.String suffix,
int initialValue)
throws java.lang.Exception
type - The type Stringprefix - Prefix String or nullsuffix - Suffix String or null
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||