org.sonar.jpa.dialect
Class PostgreSQLSequenceGenerator

java.lang.Object
  extended by org.hibernate.id.SequenceGenerator
      extended by org.sonar.jpa.dialect.PostgreSQLSequenceGenerator
All Implemented Interfaces:
org.hibernate.id.Configurable, org.hibernate.id.IdentifierGenerator, org.hibernate.id.PersistentIdentifierGenerator

public class PostgreSQLSequenceGenerator
extends org.hibernate.id.SequenceGenerator

if the underlying database is PostgreSQL, the sequence naming convention is different and includes the primary key column name

Since:
1.10

Field Summary
static String SEQUENCE_NAME_SEPARATOR
           
static String SEQUENCE_NAME_SUFFIX
           
 
Fields inherited from class org.hibernate.id.SequenceGenerator
PARAMETERS, SEQUENCE
 
Fields inherited from interface org.hibernate.id.PersistentIdentifierGenerator
CATALOG, PK, SCHEMA, SQL_STATEMENT_LOGGER, TABLE, TABLES
 
Fields inherited from interface org.hibernate.id.IdentifierGenerator
ENTITY_NAME
 
Constructor Summary
PostgreSQLSequenceGenerator()
           
 
Method Summary
 void configure(org.hibernate.type.Type type, Properties params, org.hibernate.dialect.Dialect dialect)
           
 
Methods inherited from class org.hibernate.id.SequenceGenerator
generate, generatorKey, getSequenceName, sqlCreateStrings, sqlDropStrings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEQUENCE_NAME_SEPARATOR

public static final String SEQUENCE_NAME_SEPARATOR
See Also:
Constant Field Values

SEQUENCE_NAME_SUFFIX

public static final String SEQUENCE_NAME_SUFFIX
See Also:
Constant Field Values
Constructor Detail

PostgreSQLSequenceGenerator

public PostgreSQLSequenceGenerator()
Method Detail

configure

public void configure(org.hibernate.type.Type type,
                      Properties params,
                      org.hibernate.dialect.Dialect dialect)
               throws org.hibernate.MappingException
Specified by:
configure in interface org.hibernate.id.Configurable
Overrides:
configure in class org.hibernate.id.SequenceGenerator
Throws:
org.hibernate.MappingException


Copyright © 2009-2011 SonarSource. All Rights Reserved.