Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.directory.sql
Class SimpleIdGenerator

java.lang.Object
  extended by org.nuxeo.ecm.directory.sql.SimpleIdGenerator
All Implemented Interfaces:
IdGenerator

public class SimpleIdGenerator
extends java.lang.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

Constructor Summary
SimpleIdGenerator(java.sql.Connection sqlConnection, Table table, Dialect dialect, java.lang.String idColumn)
           
 
Method Summary
 int nextId()
          Generates a new id which can be used to create a new entry in the directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleIdGenerator

public SimpleIdGenerator(java.sql.Connection sqlConnection,
                         Table table,
                         Dialect dialect,
                         java.lang.String idColumn)
                  throws DirectoryException
Throws:
DirectoryException
Method Detail

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.