Example usage for org.hibernate.id SequenceGenerator configure

List of usage examples for org.hibernate.id SequenceGenerator configure

Introduction

In this page you can find the example usage for org.hibernate.id SequenceGenerator configure.

Prototype

@Override
    @SuppressWarnings("StatementWithEmptyBody")
    public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException 

Source Link

Usage

From source file:com.googlecode.sarasvati.hib.SarasvatiIdentifierGenerator.java

License:Open Source License

@Override
public void configure(final Type type, final Properties properties, final Dialect dialect)
        throws MappingException {
    if (dialect.supportsIdentityColumns()) {
        generator = new IdentityGenerator();
    } else {//  w  w  w .  ja  v  a2 s . c om
        final SequenceGenerator seqGenerator = new SequenceGenerator();
        seqGenerator.configure(type, properties, dialect);
        generator = seqGenerator;
    }
}