public interface

TypeHelper

org.hibernate.TypeHelper
Known Indirect Subclasses

Class Overview

Provides access to the various Type instances associated with the SessionFactory.

This is intended for use by application developers.

Summary

Public Methods
abstract Type any(Type metaType, Type identifierType)
abstract BasicType basic(Class javaType)
Convenience form of basic(String).
abstract BasicType basic(String name)
Retrieve the basic type registered against the given name.
abstract Type custom(Class userTypeClass, Properties properties)
Retrieve the type for the given user-type class (UserType or CompositeUserType).
abstract Type custom(Class userTypeClass)
Retrieve the type for the given user-type class (UserType or CompositeUserType).
abstract Type entity(String entityName)
Retrieve a type representing the given entity.
abstract Type entity(Class entityClass)
Retrieve a type representing the given entity.
abstract Type heuristicType(String name)
Uses heuristics to deduce the proper Type given a string naming the type or Java class.

Public Methods

public abstract Type any (Type metaType, Type identifierType)

public abstract BasicType basic (Class javaType)

Convenience form of basic(String). The intended use of this is something like basic(Integer.class) or basic(int.class)

Parameters
javaType The java type for which to retrieve the type instance.
Returns
  • The basic type, or null.

public abstract BasicType basic (String name)

Retrieve the basic type registered against the given name.

Parameters
name The name of the basic type to retrieve
Returns
  • The basic type, or null.

public abstract Type custom (Class userTypeClass, Properties properties)

Retrieve the type for the given user-type class (UserType or CompositeUserType).

Parameters
userTypeClass The user type class
properties Configuration properties.
Returns
  • The type, or null

public abstract Type custom (Class userTypeClass)

Retrieve the type for the given user-type class (UserType or CompositeUserType).

Parameters
userTypeClass The user type class
Returns
  • The type, or null

public abstract Type entity (String entityName)

Retrieve a type representing the given entity.

Parameters
entityName The entity name.
Returns
  • The type, or null

public abstract Type entity (Class entityClass)

Retrieve a type representing the given entity.

Parameters
entityClass The entity Java type.
Returns
  • The type, or null

public abstract Type heuristicType (String name)

Uses heuristics to deduce the proper Type given a string naming the type or Java class.

See heuristicType(java.lang.String) for a discussion of the heuristic algorithm.

Parameters
name The name of the type or Java class
Returns
  • The deduced type, or null.