org.nuxeo.ecm.directory.sql
Class SimpleIdGenerator
java.lang.Object
org.nuxeo.ecm.directory.sql.SimpleIdGenerator
- All Implemented Interfaces:
- IdGenerator
public class SimpleIdGenerator
- extends Object
- implements IdGenerator
This class implements a simple id generator.
It first queries the database to retrieve the maximum value for the id column,
then it returns.
- Author:
- George Lefter
Method Summary |
int |
nextId()
Generates a new id which can be used to create a new entry in the directory. |
SimpleIdGenerator
public SimpleIdGenerator(Connection sqlConnection,
Table table,
Dialect dialect,
String idColumn)
throws DirectoryException
- Throws:
DirectoryException
nextId
public int nextId()
throws DirectoryException
- Description copied from interface:
IdGenerator
- Generates a new id which can be used to create a new entry in the directory.
- Specified by:
nextId
in interface IdGenerator
- Returns:
- the next available id
- Throws:
DirectoryException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.