程序包 org.hibernate
接口 TypeHelper
-
- 所有已知实现类:
TypeLocatorImpl
public interface TypeHelperProvides access to the variousTypeinstances associated with theSessionFactory. This is intended for use by application developers.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Typeany(Type metaType, Type identifierType)Retrieve the type representing an ANY mapping.BasicTypebasic(Class javaType)Convenience form ofbasic(String).BasicTypebasic(String name)Retrieve the basic type registered against the given name.Typecustom(Class userTypeClass)Retrieve the type for the given user-type class (UserTypeorCompositeUserType).Typecustom(Class userTypeClass, Properties properties)Retrieve the type for the given user-type class (UserTypeorCompositeUserType).Typeentity(Class entityClass)Retrieve a type representing the given entity.Typeentity(String entityName)Retrieve a type representing the given entity.TypeheuristicType(String name)Uses heuristics to deduce the properTypegiven a string naming the type or Java class.
-
-
-
方法详细资料
-
basic
BasicType basic(String name)
Retrieve the basic type registered against the given name.- 参数:
name- The name of the basic type to retrieve- 返回:
- The basic type, or null.
-
basic
BasicType basic(Class javaType)
Convenience form ofbasic(String). The intended use of this is something likebasic(Integer.class)orbasic(int.class)- 参数:
javaType- The java type for which to retrieve the type instance.- 返回:
- The basic type, or null.
-
heuristicType
Type heuristicType(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.- 参数:
name- The name of the type or Java class- 返回:
- The deduced type, or null.
- 另请参阅:
TypeResolver.heuristicType(java.lang.String)
-
entity
Type entity(Class entityClass)
Retrieve a type representing the given entity.- 参数:
entityClass- The entity Java type.- 返回:
- The type, or null
-
entity
Type entity(String entityName)
Retrieve a type representing the given entity.- 参数:
entityName- The entity name.- 返回:
- The type, or null
-
custom
Type custom(Class userTypeClass)
Retrieve the type for the given user-type class (UserTypeorCompositeUserType).- 参数:
userTypeClass- The user type class- 返回:
- The type, or null
-
custom
Type custom(Class userTypeClass, Properties properties)
Retrieve the type for the given user-type class (UserTypeorCompositeUserType).- 参数:
userTypeClass- The user type classproperties- Configuration properties.- 返回:
- The type, or null
-
-