Top Description Inners Fields Constructors Methods
org.hibernate.id

public final Class IdentifierGeneratorHelper

extends Object
Class Inheritance
Imports
java.io.Serializable, java.math.BigDecimal, .BigInteger, java.sql.PreparedStatement, .ResultSet, .SQLException, org.slf4j.Logger, .LoggerFactory, org.hibernate.HibernateException, org.hibernate.type.Type, .CustomType

Factory and helper methods for IdentifierGenerator framework.
Authors
Gavin King, Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static final Logger
public static final Serializable
POST_INSERT_INDICATOR

Marker object returned from IdentifierGenerator#generate to indicate that the entity's identifier will be generated as part of the datbase insertion.

public static final Serializable
SHORT_CIRCUIT_INDICATOR

Marker object returned from IdentifierGenerator#generate to indicate that we should short-circuit any continued generated id checking.

Constructor Summary

AccessConstructor and Description
private
IdentifierGeneratorHelper()

Disallow instantiation of IdentifierGeneratorHelper.

Method Summary

Modifier and TypeMethod and Description
public static Number

Returns:

The wrapped type.
createNumber
(long
The primitive value to wrap.
value
,
Class<T>
The Java numeric type in which to wrap the value.
clazz
)

Deprecated Use the holders instead.
Wrap the given value in the given Java numeric class.
public static BigDecimal
public static BigInteger
public static long
public static Serializable

Returns:

The extracted value.
get
(ResultSet
The result set from which to extract the value.
rs
,
String
The name of the identifier column
identifierColumnName
,
Type
The expected type of the value.
type
)

Extract the value from the result set (which is assumed to already have been positioned to the apopriate row) and wrp it in the appropriate Java numeric type.

public static Serializable

Returns:

The generated identity value
getGeneratedIdentity
(ResultSet
The result set from which to extract the the generated identity.
rs
,
String
The name of the identifier column
identifierColumnName
,
Type
The expected type mapping for the identity value.
type
)

Get the generated identifier when using identity columns

public static IntegralDataTypeHolder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait