Class CoercionHelper
- java.lang.Object
-
- org.hibernate.type.descriptor.java.CoercionHelper
-
public class CoercionHelper extends Object
Helper for type coercions. Mainly used for narrowing coercions which might lead to under/over-flow problems
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCoercionHelper.Coercer<T>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TcoerceWrappingError(CoercionHelper.Coercer<T> coercer)static booleanisWholeNumber(double doubleValue)static booleanisWholeNumber(float floatValue)static BigIntegertoBigInteger(Double doubleValue)static BigIntegertoBigInteger(Float floatValue)static BigIntegertoBigInteger(BigDecimal value)static BytetoByte(Double value)static BytetoByte(Float value)static BytetoByte(Integer value)static BytetoByte(Long value)static BytetoByte(Short value)static BytetoByte(BigDecimal value)static BytetoByte(BigInteger value)static DoubletoDouble(Float floatValue)static DoubletoDouble(BigDecimal value)static DoubletoDouble(BigInteger value)static IntegertoInteger(Byte value)static IntegertoInteger(Double doubleValue)static IntegertoInteger(Float floatValue)static IntegertoInteger(Long value)static IntegertoInteger(Short value)static IntegertoInteger(BigDecimal value)static IntegertoInteger(BigInteger value)static LongtoLong(Byte value)static LongtoLong(Double doubleValue)static LongtoLong(Float floatValue)static LongtoLong(Integer value)static LongtoLong(Short value)static LongtoLong(BigDecimal value)static LongtoLong(BigInteger value)static ShorttoShort(Byte value)static ShorttoShort(Double doubleValue)static ShorttoShort(Float floatValue)static ShorttoShort(Integer value)static ShorttoShort(Long value)static ShorttoShort(BigDecimal value)static ShorttoShort(BigInteger value)
-
-
-
Method Detail
-
toByte
public static Byte toByte(BigInteger value)
-
toByte
public static Byte toByte(BigDecimal value)
-
toShort
public static Short toShort(BigInteger value)
-
toShort
public static Short toShort(BigDecimal value)
-
toInteger
public static Integer toInteger(BigInteger value)
-
toInteger
public static Integer toInteger(BigDecimal value)
-
toLong
public static Long toLong(BigInteger value)
-
toLong
public static Long toLong(BigDecimal value)
-
toBigInteger
public static BigInteger toBigInteger(Double doubleValue)
-
toBigInteger
public static BigInteger toBigInteger(Float floatValue)
-
toBigInteger
public static BigInteger toBigInteger(BigDecimal value)
-
toDouble
public static Double toDouble(BigInteger value)
-
toDouble
public static Double toDouble(BigDecimal value)
-
isWholeNumber
public static boolean isWholeNumber(double doubleValue)
-
isWholeNumber
public static boolean isWholeNumber(float floatValue)
-
coerceWrappingError
public static <T> T coerceWrappingError(CoercionHelper.Coercer<T> coercer)
-
-