Java 类org.hibernate.id.SequenceGenerator 实例源码

项目:lams    文件:DefaultIdentifierGeneratorFactory.java   
/**
 * Constructs a new DefaultIdentifierGeneratorFactory.
 */
public DefaultIdentifierGeneratorFactory() {
    register( "uuid2", UUIDGenerator.class );
    register( "guid", GUIDGenerator.class );            // can be done with UUIDGenerator + strategy
    register( "uuid", UUIDHexGenerator.class );         // "deprecated" for new use
    register( "uuid.hex", UUIDHexGenerator.class );     // uuid.hex is deprecated
    register( "hilo", TableHiLoGenerator.class );
    register( "assigned", Assigned.class );
    register( "identity", IdentityGenerator.class );
    register( "select", SelectGenerator.class );
    register( "sequence", SequenceGenerator.class );
    register( "seqhilo", SequenceHiLoGenerator.class );
    register( "increment", IncrementGenerator.class );
    register( "foreign", ForeignGenerator.class );
    register( "sequence-identity", SequenceIdentityGenerator.class );
    register( "enhanced-sequence", SequenceStyleGenerator.class );
    register( "enhanced-table", TableGenerator.class );
}
项目:lams    文件:Dialect.java   
/**
 * The class (which implements {@link org.hibernate.id.IdentifierGenerator})
 * which acts as this dialects native generation strategy.
 * <p/>
 * Comes into play whenever the user specifies the native generator.
 *
 * @return The native generator class.
 */
public Class getNativeIdentifierGeneratorClass() {
    if ( supportsIdentityColumns() ) {
        return IdentityGenerator.class;
    }
    else if ( supportsSequences() ) {
        return SequenceGenerator.class;
    }
    else {
        return TableHiLoGenerator.class;
    }
}
项目:gorm-hibernate5    文件:GrailsIdentifierGeneratorFactory.java   
@Override
public Class getIdentifierGeneratorClass(String strategy) {
    Class generatorClass = super.getIdentifierGeneratorClass(strategy);
    if("native".equals(strategy) && generatorClass == SequenceGenerator.class) {
        generatorClass = super.getIdentifierGeneratorClass("sequence-identity");
    }
    return generatorClass;
}
项目:cacheonix-core    文件:Dialect.java   
/**
 * The class (which implements {@link org.hibernate.id.IdentifierGenerator})
 * which acts as this dialects native generation strategy.
 * <p/>
 * Comes into play whenever the user specifies the native generator.
 *
 * @return The native generator class.
 */
public Class getNativeIdentifierGeneratorClass() {
    if ( supportsIdentityColumns() ) {
        return IdentityGenerator.class;
    }
    else if ( supportsSequences() ) {
        return SequenceGenerator.class;
    }
    else {
        return TableHiLoGenerator.class;
    }
}
项目:lams    文件:PostgreSQL81Dialect.java   
@Override
public Class getNativeIdentifierGeneratorClass() {
    return SequenceGenerator.class;
}
项目:cacheonix-core    文件:PostgreSQLDialect.java   
public Class getNativeIdentifierGeneratorClass() {
    return SequenceGenerator.class;
}
项目:cacheonix-core    文件:HqlSqlWalker.java   
public static boolean supportsIdGenWithBulkInsertion(IdentifierGenerator generator) {
    return SequenceGenerator.class.isAssignableFrom( generator.getClass() )
            || PostInsertIdentifierGenerator.class.isAssignableFrom( generator.getClass() );
}
项目:sql-layer-adapter-hibernate    文件:FoundationDBSQLDialect.java   
@Override
public Class getNativeIdentifierGeneratorClass() {
    return SequenceGenerator.class;
}