org.hibernate
Interface TypeHelper

All Known Implementing Classes:
TypeLocatorImpl

public interface TypeHelper

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

This is intended for use by application developers.


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

Method Detail

basic

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.

basic

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.

heuristicType

Type heuristicType(String name)
Uses heuristics to deduce the proper Type given a string naming the type or Java class.

See TypeResolver.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.
See Also:
TypeResolver.heuristicType(java.lang.String)

entity

Type entity(Class entityClass)
Retrieve a type representing the given entity.

Parameters:
entityClass - The entity Java type.
Returns:
The type, or null

entity

Type entity(String entityName)
Retrieve a type representing the given entity.

Parameters:
entityName - The entity name.
Returns:
The type, or null

custom

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

custom

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

any

Type any(Type metaType,
         Type identifierType)


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