| Manages sequences of unique ID's that get stored in the database. Database
support for sequences varies widely; some don't support them at all. So,
we handle unique ID generation with synchronized counters.
Selecting the initial ID for each sequence is trivial: we simply query the
database to get the last highest unique ID, and then add 1 to that.
This method only works if a single instance is pointed at a database.
Otherwise, the unique ID's will stop being unique. :) A refined class that
deals with this is coming soon.
|