Class CoercionHelper
java.lang.Object
org.hibernate.type.descriptor.java.CoercionHelper
Helper for type coercions. Mainly used for narrowing coercions which
might lead to under/over-flow problems
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 Bytestatic Bytestatic Bytestatic Bytestatic Bytestatic BytetoByte(BigDecimal value) static BytetoByte(BigInteger value) static Doublestatic DoubletoDouble(BigDecimal value) static DoubletoDouble(BigInteger value) static Integerstatic Integerstatic Integerstatic Integerstatic Integerstatic IntegertoInteger(BigDecimal value) static IntegertoInteger(BigInteger value) static Longstatic Longstatic Longstatic Longstatic Longstatic LongtoLong(BigDecimal value) static LongtoLong(BigInteger value) static Shortstatic Shortstatic Shortstatic Shortstatic Shortstatic ShorttoShort(BigDecimal value) static ShorttoShort(BigInteger value)
-
Method Details
-
toByte
-
toByte
-
toByte
-
toByte
-
toByte
-
toByte
-
toByte
-
toShort
-
toShort
-
toShort
-
toShort
-
toShort
-
toShort
-
toShort
-
toInteger
-
toInteger
-
toInteger
-
toInteger
-
toInteger
-
toInteger
-
toInteger
-
toLong
-
toLong
-
toLong
-
toLong
-
toLong
-
toLong
-
toLong
-
toBigInteger
-
toBigInteger
-
toBigInteger
-
toDouble
-
toDouble
-
toDouble
-
isWholeNumber
public static boolean isWholeNumber(double doubleValue) -
isWholeNumber
public static boolean isWholeNumber(float floatValue) -
coerceWrappingError
-