Package nl.cwi.monetdb.embedded.mapping
Class NullMappings
java.lang.Object
nl.cwi.monetdb.embedded.mapping.NullMappings
public final class NullMappings extends Object
Helper Class to find the null values mapping between MonetDB and Java.
- Author:
- Pedro Ferreira
-
Method Summary
Modifier and Type Method Description static boolean
checkByteIsNull(byte value)
Tests if a byte is a null value.static boolean
checkDoubleIsNull(double value)
Tests if a double is a null value.static boolean
checkFloatIsNull(float value)
Tests if a float is a null value.static boolean
checkIntIsNull(int value)
Tests if an integer is a null value.static boolean
checkLongIsNull(long value)
Tests if a long is a null value.static <T> boolean
checkObjectIsNull(T value)
Tests if an object is a null value.static boolean
checkShortIsNull(short value)
Tests if a short is a null value.static byte
getBooleanNullConstant()
Gets MonetDB's boolean null constant.static byte
getByteNullConstant()
Gets MonetDB's byte null constant.static double
getDoubleNullConstant()
Gets MonetDB's double null constant.static float
getFloatNullConstant()
Gets MonetDB's float null constant.static int
getIntNullConstant()
Gets MonetDB's int null constant.static long
getLongNullConstant()
Gets MonetDB's long null constant.static <T> T
getObjectNullConstant()
A null pointer returning method.static short
getShortNullConstant()
Gets MonetDB's short null constant.
-
Method Details
-
getBooleanNullConstant
public static byte getBooleanNullConstant()Gets MonetDB's boolean null constant.- Returns:
- MonetDB's boolean null constant
-
getByteNullConstant
public static byte getByteNullConstant()Gets MonetDB's byte null constant.- Returns:
- MonetDB's byte null constant
-
checkByteIsNull
public static boolean checkByteIsNull(byte value)Tests if a byte is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getShortNullConstant
public static short getShortNullConstant()Gets MonetDB's short null constant.- Returns:
- MonetDB's short null constant
-
checkShortIsNull
public static boolean checkShortIsNull(short value)Tests if a short is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getIntNullConstant
public static int getIntNullConstant()Gets MonetDB's int null constant.- Returns:
- MonetDB's int null constant
-
checkIntIsNull
public static boolean checkIntIsNull(int value)Tests if an integer is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getLongNullConstant
public static long getLongNullConstant()Gets MonetDB's long null constant.- Returns:
- MonetDB's long null constant
-
checkLongIsNull
public static boolean checkLongIsNull(long value)Tests if a long is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getFloatNullConstant
public static float getFloatNullConstant()Gets MonetDB's float null constant.- Returns:
- MonetDB's float null constant
-
checkFloatIsNull
public static boolean checkFloatIsNull(float value)Tests if a float is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getDoubleNullConstant
public static double getDoubleNullConstant()Gets MonetDB's double null constant.- Returns:
- MonetDB's double null constant
-
checkDoubleIsNull
public static boolean checkDoubleIsNull(double value)Tests if a double is a null value.- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-
getObjectNullConstant
public static <T> T getObjectNullConstant()A null pointer returning method.- Type Parameters:
T
- The Java class of the mapped MonetDB column- Returns:
- A null pointer
-
checkObjectIsNull
public static <T> boolean checkObjectIsNull(T value)Tests if an object is a null value.- Type Parameters:
T
- The Java class of the mapped MonetDB column- Parameters:
value
- The value to test- Returns:
- A boolean indicating if the value is null
-