1 package org.splat.kernel;
3 * Class generating the persistent identifier of all objects instance of a subclass of Any.<br/>
4 * The implementation of this generator is optimized basing on IDPool.
7 * @author Daniel Brunier-Coulin
8 * @copyright OPEN CASCADE 2012
11 import java.io.Serializable;
13 import org.hibernate.HibernateException;
14 import org.hibernate.engine.SessionImplementor;
15 import org.hibernate.id.IdentifierGenerator;
18 public class IDGenerator implements IdentifierGenerator {
20 public Serializable generate (SessionImplementor session, Object any) throws HibernateException {
21 // ---------------------------------------------------------------------
22 return Database.getIDPool().getNextID();