类 ValueHandlerFactory
- java.lang.Object
-
- org.hibernate.query.criteria.internal.ValueHandlerFactory
-
public class ValueHandlerFactory extends Object
Helper for generically dealing with literal values.- 作者:
- Steve Ebersole
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classValueHandlerFactory.BaseValueHandler<T>static classValueHandlerFactory.BigDecimalValueHandlerstatic classValueHandlerFactory.BigIntegerValueHandlerstatic classValueHandlerFactory.BooleanValueHandlerstatic classValueHandlerFactory.ByteValueHandlerstatic classValueHandlerFactory.DoubleValueHandlerstatic classValueHandlerFactory.FloatValueHandlerstatic classValueHandlerFactory.IntegerValueHandlerstatic classValueHandlerFactory.LongValueHandlerstatic classValueHandlerFactory.NoOpValueHandler<T>static classValueHandlerFactory.ShortValueHandlerstatic classValueHandlerFactory.StringValueHandlerstatic interfaceValueHandlerFactory.ValueHandler<T>
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> Tconvert(Object value, Class<T> targetType)Convert the given value into the specified target type.static <T> ValueHandlerFactory.ValueHandler<T>determineAppropriateHandler(Class<T> targetType)Determine the appropriateValueHandlerFactory.ValueHandlerstrategy for converting a value to the given target typestatic booleanisBoolean(Object value)static booleanisCharacter(Class type)static booleanisCharacter(Object value)static booleanisNumeric(Class type)static booleanisNumeric(Object value)
-
-
-
方法详细资料
-
isCharacter
public static boolean isCharacter(Class type)
-
isCharacter
public static boolean isCharacter(Object value)
-
isNumeric
public static boolean isNumeric(Class type)
-
isNumeric
public static boolean isNumeric(Object value)
-
isBoolean
public static boolean isBoolean(Object value)
-
convert
public static <T> T convert(Object value, Class<T> targetType)
Convert the given value into the specified target type.- 参数:
value- The value to converttargetType- The type to which it should be converted- 返回:
- The converted value.
-
determineAppropriateHandler
public static <T> ValueHandlerFactory.ValueHandler<T> determineAppropriateHandler(Class<T> targetType)
Determine the appropriateValueHandlerFactory.ValueHandlerstrategy for converting a value to the given target type- 类型参数:
T- parameterized type for the target type.- 参数:
targetType- The target type (to which we want to convert values).- 返回:
- The conversion
-
-