Package org.hibernate
Interface TypeHelper
-
public interface TypeHelperProvides access to the variousTypeinstances associated with theSessionFactory. This is intended for use by application developers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Typeany(Type metaType, Type identifierType)Retrieve the type representing an ANY mapping.BasicTypebasic(java.lang.Class javaType)Convenience form ofbasic(String).BasicTypebasic(java.lang.String name)Retrieve the basic type registered against the given name.Typecustom(java.lang.Class userTypeClass)Retrieve the type for the given user-type class (UserTypeorCompositeUserType).Typecustom(java.lang.Class userTypeClass, java.util.Properties properties)Retrieve the type for the given user-type class (UserTypeorCompositeUserType).Typeentity(java.lang.Class entityClass)Retrieve a type representing the given entity.Typeentity(java.lang.String entityName)Retrieve a type representing the given entity.TypeheuristicType(java.lang.String name)Uses heuristics to deduce the properTypegiven a string naming the type or Java class.
-
-
-
Method Detail
-
basic
BasicType basic(java.lang.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(java.lang.Class javaType)
Convenience form ofbasic(String). The intended use of this is something likebasic(Integer.class)orbasic(int.class)- Parameters:
javaType- The java type for which to retrieve the type instance.- Returns:
- The basic type, or null.
-
heuristicType
Type heuristicType(java.lang.String name)
Uses heuristics to deduce the properTypegiven a string naming the type or Java class. SeeTypeResolver.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(java.lang.Class entityClass)
Retrieve a type representing the given entity.- Parameters:
entityClass- The entity Java type.- Returns:
- The type, or null
-
entity
Type entity(java.lang.String entityName)
Retrieve a type representing the given entity.- Parameters:
entityName- The entity name.- Returns:
- The type, or null
-
custom
Type custom(java.lang.Class userTypeClass)
Retrieve the type for the given user-type class (UserTypeorCompositeUserType).- Parameters:
userTypeClass- The user type class- Returns:
- The type, or null
-
custom
Type custom(java.lang.Class userTypeClass, java.util.Properties properties)
Retrieve the type for the given user-type class (UserTypeorCompositeUserType).- Parameters:
userTypeClass- The user type classproperties- Configuration properties.- Returns:
- The type, or null
-
-