public class

IncrementGenerator

extends Object
implements Configurable IdentifierGenerator
java.lang.Object
   ↳ org.hibernate.id.IncrementGenerator

Class Overview

increment

An IdentifierGenerator that returns a long, constructed by counting from the maximum primary key value at startup. Not safe for use in a cluster!

Mapping parameters supported, but not usually needed: tables, column. (The tables parameter specified a comma-separated list of table names.)

Summary

[Expand]
Inherited Constants
From interface org.hibernate.id.IdentifierGenerator
Public Constructors
IncrementGenerator()
Public Methods
void configure(Type type, Properties params, Dialect dialect)
Configure this instance, given the value of parameters specified by the user as <param> elements.
synchronized Serializable generate(SessionImplementor session, Object object)
Generate a new identifier.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.id.Configurable
From interface org.hibernate.id.IdentifierGenerator

Public Constructors

public IncrementGenerator ()

Public Methods

public void configure (Type type, Properties params, Dialect dialect)

Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.

Parameters
params param values, keyed by parameter name

public synchronized Serializable generate (SessionImplementor session, Object object)

Generate a new identifier.

Parameters
object the entity or toplevel collection for which the id is being generated
Returns
  • a new identifier