Code example for TableGenerator

 * and {@link OptimizerFactory.PooledOptimizer} into a single class because of 
 * weirdness in their implementation. Instead, uses our own ome_nextval(?,?) 
 * method to keep the Hibernate sequence values ({@link #hiValue}) in sync with 
 * the database values. 
public class TableIdGenerator extends TableGenerator {
    private final static Logger log = LoggerFactory.getLogger(TableIdGenerator.class);
    long value;
    long hiValue = -1;
    private SqlAction sql = null;
    public void configure(Type type, Properties params, Dialect dialect)
            throws MappingException {
        super.configure(type, params, dialect);
Contextual code suggestions in your IDE  Get Codota for Java