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, .ResultSetMetaData, .SQLException, org.hibernate.HibernateException, org.hibernate.dialect.Dialect, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.StringHelper, org.hibernate.type.CustomType, .Type

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 CoreMessageLogger
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 database 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
private static Serializable
extractIdentifier(ResultSet rs, String identifier, Type type, Class<T> clazz)

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
identifier
,
Type
The expected type of the value.
type
,
Dialect
The current database dialect.
dialect
)

Extract the value from the result set (which is assumed to already have been positioned to the appropriate 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
identifier
,
Type
The expected type mapping for the identity value.
type
,
Dialect
The current database dialect.
dialect
)

Get the generated identifier when using identity columns

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