List of usage examples for org.hibernate.id PersistentIdentifierGenerator interface-usage
From source file com.enonic.cms.store.hibernate.id.IntegerBasedCustomIdentifierGenerator.java
/** * Class for generating keys for our "user typed" identifiers. Specify table and idClassName, where idClassName is the actual domain class * to instantiate passing an Integer to the constructor. */ public class IntegerBasedCustomIdentifierGenerator extends TransactionHelper implements PersistentIdentifierGenerator, Configurable {
From source file com.literatejava.hibernate.allocator.LinearBlockAllocator.java
/**
* Allocate Long or Integer keys, using a portable table-based algorithm.
* <ul>
* <li>This strategy is highly efficient, database-portable, and simplifies/ supersedes HiLo-type strategies.
* <li>Keys are allocated in blocks from an "allocator" table, with a current block held in memory; used by the application as required.
* <li>Default block-size of 20 outperforms SEQUENCE allocation by a factor of 10 or more, using only standard SQL & fully portable
From source file de.innovationgate.webgate.api.mysql.GaleraClusterTableGenerator.java
/**
* Trying to apply the lesson on this article to a hibernate table generator:
* http://www.joinfu.com/2015/01/understanding-reservations-concurrency-locking-in-nova/
* Actually the original TableGenerator already does many things right (like querying for the value on the update statement
* and retrying update while returned rows on it is 0) but still uses "for update" of the select statement.
* Instead it should remove this and retry also if it gets the deadlock exception (which is still possible)
From source file net.e6tech.elements.persist.hibernate.ModifiedTableGenerator.java
/** * This is almost an identical copy of Hibernate's TableGenerator. We modified it so that initialValue can be a long */ public class ModifiedTableGenerator implements PersistentIdentifierGenerator, Configurable { private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class,
From source file org.apache.ode.daohib.NativeHiLoGenerator.java
public class NativeHiLoGenerator implements IdentifierGenerator, PersistentIdentifierGenerator, Configurable { private static final Log __log = LogFactory.getLog(NativeHiLoGenerator.class); private IdentifierGenerator _proxy; public NativeHiLoGenerator() { super();
From source file org.hyperic.hibernate.id.ComboGenerator.java
/** * The ComboGenerator dispatches to either a sequence-based generator * or a HQMultipleHiLoPerTableGenerator, depending on whether or not the * DB supports sequences. */ public class ComboGenerator implements PersistentIdentifierGenerator, Configurable {
From source file org.hyperic.hibernate.id.HQMultipleHiLoPerTableGenerator.java
/**
*
* A hilo <tt>IdentifierGenerator</tt> that returns a <tt>Long</tt>, constructed
* using a hi/lo algorithm. The hi value MUST be fetched in a seperate
* transaction to the <tt>Session</tt> transaction so the generator must be able
* to obtain a new connection and commit it. If running in a Spring-managed
From source file org.jboss.ejb3.entity.JTATableIdGenerator.java
/**
* A hilo <tt>IdentifierGenerator</tt> that uses a database
* table to store the last generated value.
* <p/>
* <p/>
* This implementation is solely for use inside JBoss using JTA for transactions.
From source file org.opentaps.foundation.entity.hibernate.OpentapsIdentifierGenerator.java
/** * the IdentifierGenerator which for all opentaps POJOs generate Id. */ public class OpentapsIdentifierGenerator extends TransactionHelper implements PersistentIdentifierGenerator, Configurable { private static final String MODULE = OpentapsIdentifierGenerator.class.getName();