Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.id
Class SequenceHiLoGenerator

    java.lang.Object
      org.hibernate.id.SequenceGenerator
          org.hibernate.id.SequenceHiLoGenerator

All Implemented Interfaces:
  BulkInsertionCapableIdentifierGenerator, Configurable, IdentifierGenerator, PersistentIdentifierGenerator

    public class SequenceHiLoGenerator

extends SequenceGenerator

seqhilo
An `IdentifierGenerator` that combines a hi/lo algorithm with an underlying oracle-style sequence that generates hi values. The user may specify a maximum lo value to determine how often new hi values are fetched.
If sequences are not available, `TableHiLoGenerator` might be an alternative.
Mapping parameters supported: sequence, max_lo, parameters.

See Also:
  `TableHiLoGenerator`

Field Summary
`static String` | `MAX_LO`

Fields inherited from class org.hibernate.id.SequenceGenerator
`PARAMETERS, SEQUENCE`

Fields inherited from interface org.hibernate.id.PersistentIdentifierGenerator
`CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, TABLE, TABLES`

Fields inherited from interface org.hibernate.id.IdentifierGenerator
`ENTITY_NAME`

Constructor Summary
`SequenceHiLoGenerator()`

Method Summary
`void` | `configure(Type type, Properties params, Dialect d)` Configure this instance, given the value of parameters specified by the user as `<param>` elements.
`Serializable` | `generate(SessionImplementor session, Object obj)` Generate a new identifier.

Methods inherited from class org.hibernate.id.SequenceGenerator
`buildHolder, determineBulkInsertionIdentifierGenerationSelectFragment, generateHolder, generatorKey, getIdentifierType, getSequenceName, sqlCreateStrings, sqlDropStrings, supportsBulkInsertionIdentifierGeneration`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAX_LO

    public static final String MAX_LO

See Also:
  Constant Field Values

Constructor Detail

### SequenceHiLoGenerator

    public SequenceHiLoGenerator()

Method Detail

### configure

    public void configure(Type type,
                          Properties params,
                          Dialect d)
                   throws MappingException

  Description copied from interface: `Configurable`
  Configure this instance, given the value of parameters specified by the user as `<param>` elements. This method is called just once, following instantiation.

  Specified by:
    `configure` in interface `Configurable`
  Overrides:
    `configure` in class `SequenceGenerator`
    `params` - param values, keyed by parameter name
  Throws:
    `MappingException`

### generate

    public Serializable generate(SessionImplementor session,
                                 Object obj)

  Description copied from interface: `IdentifierGenerator`
  Generate a new identifier.

  Specified by:
    `generate` in interface `IdentifierGenerator`
  Overrides:
    `generate` in class `SequenceGenerator`
    `obj` - the entity or toplevel collection for which the id is being generated
  Returns:
    a new identifier

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.