Hibernate ORM TableGenerator - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM TableGenerator class.

This code example shows how to use the following methods: getIncrementSize, getSegmentValue
 
    public synchronized Serializable generate(final SessionImplementor session,
            Object obj) { 
 
        if (hiValue < 0 || value >= hiValue) {
            hiValue = sql.nextValue(getSegmentValue(), getIncrementSize());
            if (log.isDebugEnabled()) { 
                log.debug("Loaded new hiValue " + hiValue + " for "
                        + getSegmentValue());
            } 
            value = hiValue - getIncrementSize();
        } 
        value++;
        return value;
    } 
 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
 * Mapping parameters supported: table, column, attribute 
 * 
 * @author Suneet Shah 
 */ 
 
public class SequenceGenerator extends TableGenerator implements IdentifierGenerator {
 
    public static final String COLUMN = "column";
    /** 
     * Default column name 
     */ 
    public static final String DEFAULT_COLUMN_NAME = "next_hi";
    /** 
     * The table parameter 
     */ 
    public static final String TABLE = "table";
    /** 
     * Default table name 
     */ 
    public static final String DEFAULT_TABLE_NAME = "hibernate_unique_key";
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Hibernate ORM TableGenerator Methods: