org.nuxeo.ecm.platform.uidgen.service
Class UIDSequencerImpl
java.lang.Object
org.nuxeo.ecm.platform.uidgen.service.UIDSequencerImpl
- All Implemented Interfaces:
- UIDSequencer
public class UIDSequencerImpl
- extends Object
- implements UIDSequencer
This implementation uses a static persistence provider to be able to
instantiate this class without passing by Framework.getService -> this is to
avoid potential problems do to sequencer factories. Anyway sequencer
factories should be removed (I don't think they are really needed).
- Author:
- Bogdan Stefanescu
UIDSequencerImpl
public UIDSequencerImpl()
dispose
public static void dispose()
- Must be called when the service is no longer needed
getOrCreatePersistenceProvider
public static PersistenceProvider getOrCreatePersistenceProvider()
getNext
public int getNext(String key)
- Description copied from interface:
UIDSequencer
- For the given key returns the incremented UID which is also stored in the
same sequence entry. This is a "one time use" function for a document.
- Specified by:
getNext
in interface UIDSequencer
- Returns:
getNext
public int getNext(EntityManager em,
String key)
Copyright © 2011 Nuxeo SAS. All Rights Reserved.