Salome HOME
Refactoring: configuration files are moved into Siman web project.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / kernel / IDGenerator.java
1 package org.splat.kernel;
2 /**
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.
5  * 
6  * @see IDPool
7  * @author    Daniel Brunier-Coulin
8  * @copyright OPEN CASCADE 2012
9  */
10
11 import java.io.Serializable;
12
13 import org.hibernate.HibernateException;
14 import org.hibernate.engine.SessionImplementor;
15 import org.hibernate.id.IdentifierGenerator;
16
17
18 public class IDGenerator implements IdentifierGenerator {
19
20         public Serializable generate (SessionImplementor session, Object any) throws HibernateException {
21 //  ---------------------------------------------------------------------
22           return Database.getIDPool().getNextID();
23         }
24 }