Holger's Java API

## com.antelmann.db
Interface IDFactory

All Known Implementing Classes:
  GIDFactory, SessionIdGenerator, TransactionalNumberGenerator

    public interface IDFactory

provides a way for an application to centralize the creation of new IDs for DBEntry instances

Since:
  29. August 2007, 11:53
Author:
  Holger Antelmann
See Also:
  `DBEntry`, `DBClassStore.generateNewID()`

Method Summary
`Object` `generateNewID(Class<? extends DBEntry> entryClass)` generates and returns an Object suitable to be used as a new ID for an instance of the given DBEntry class.

Method Detail

### generateNewID

    Object generateNewID(Class<? extends DBEntry> entryClass)
                         throws DatabaseException,
                                IllegalArgumentException

  generates and returns an Object suitable to be used as a new ID for an instance of the given DBEntry class. Depending on the implementation, it may be required to use the ID directly within a synchronized transaction, to guarantee its uniqueness. Implementing classes should document the behavior on whether the returned ID is usable only within the same transaction and only if the method is not called again before the ID is used to store an instance, or if such restrictions do not apply.

  Returns:
    an Object for use as an ID for the given DBEntry class.
  Throws:
    `DatabaseException`
    `IllegalArgumentException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads