public class DataTypeTools extends Object
| Modifier and Type | Field and Description |
|---|---|
static Integer |
NULLIFY_VALUE |
| Constructor and Description |
|---|
DataTypeTools(Tools tools) |
| Modifier and Type | Method and Description |
|---|---|
static Long |
convertBigIntegerToLong(BigInteger value) |
static Calendar |
convertStringToCalendar(String date) |
static Date |
convertStringToDate(String date) |
static BigDecimal |
decodeAmount(org.openapplications.oagis_segments.AMOUNT inforNumber) |
static String |
decodeBigDecimal(BigDecimal bigDecimalValue) |
static String |
decodeBigInteger(BigInteger bigIntegerValue) |
String |
decodeBoolean(Boolean value) |
static Boolean |
decodeBoolean(String value)
Decode a boolean
|
static Date |
decodeInforDate(org.openapplications.oagis_segments.DATETIME inforDateTime) |
static BigDecimal |
decodeQuantity(org.openapplications.oagis_segments.QUANTITY inforNumber) |
static org.openapplications.oagis_segments.AMOUNT |
encodeAmount(BigDecimal numberValue,
String numberLabel) |
static BigDecimal |
encodeBigDecimal(String stringValue,
String valueLabel) |
static BigInteger |
encodeBigInteger(String stringValue,
String valueLabel) |
static String |
encodeBoolean(Boolean value,
BooleanType returnType)
Encodes the boolean according to the type received
|
double |
encodeDouble(String doubleValue,
String longLabel) |
static org.openapplications.oagis_segments.DATETIME |
encodeInforDate(Date dateValue,
String dateLabel) |
long |
encodeLong(String longValue,
String longLabel) |
static org.openapplications.oagis_segments.QUANTITY |
encodeQuantity(BigDecimal numberValue,
String numberLabel) |
static org.openapplications.oagis_segments.DATETIME |
formatDate(String dateValue,
String dateLabel) |
static boolean |
isEmpty(String value) |
static boolean |
isFalseValue(String value) |
static boolean |
isNotEmpty(String value) |
static boolean |
isTrueValue(String value) |
static <T> T |
nonNullOrDefault(T newValue,
T defaultValue) |
String |
retrieveDate(org.openapplications.oagis_segments.DATETIME inforDateTime) |
String |
retrieveDate(org.openapplications.oagis_segments.DATETIME inforDateTime,
String dateFormat) |
static String |
toCodeString(net.datastream.schemas.mp_fields.CLASSID_Type classIdType) |
static String |
toCodeString(net.datastream.schemas.mp_fields.LOCATIONID_Type locationIdType) |
public static final Integer NULLIFY_VALUE
public DataTypeTools(Tools tools)
public static org.openapplications.oagis_segments.DATETIME encodeInforDate(Date dateValue, String dateLabel) throws InforException
InforExceptionpublic static org.openapplications.oagis_segments.DATETIME formatDate(String dateValue, String dateLabel) throws InforException
InforExceptionpublic String retrieveDate(org.openapplications.oagis_segments.DATETIME inforDateTime, String dateFormat)
public String retrieveDate(org.openapplications.oagis_segments.DATETIME inforDateTime)
public static Date decodeInforDate(org.openapplications.oagis_segments.DATETIME inforDateTime)
public static org.openapplications.oagis_segments.QUANTITY encodeQuantity(BigDecimal numberValue, String numberLabel) throws InforException
InforExceptionpublic static BigDecimal decodeQuantity(org.openapplications.oagis_segments.QUANTITY inforNumber)
public static org.openapplications.oagis_segments.AMOUNT encodeAmount(BigDecimal numberValue, String numberLabel) throws InforException
InforExceptionpublic static BigDecimal decodeAmount(org.openapplications.oagis_segments.AMOUNT inforNumber)
public long encodeLong(String longValue, String longLabel) throws InforException
InforExceptionpublic double encodeDouble(String doubleValue, String longLabel) throws InforException
InforExceptionpublic static BigDecimal encodeBigDecimal(String stringValue, String valueLabel) throws InforException
InforExceptionpublic static String decodeBigDecimal(BigDecimal bigDecimalValue)
public static BigInteger encodeBigInteger(String stringValue, String valueLabel) throws InforException
InforExceptionpublic static String decodeBigInteger(BigInteger bigIntegerValue)
public static String encodeBoolean(Boolean value, BooleanType returnType)
value - Boolean receivedreturnType - Type of return that should be usedpublic static Boolean decodeBoolean(String value)
value - Value to be converted as a booleanpublic static boolean isTrueValue(String value)
public static boolean isFalseValue(String value)
public static boolean isEmpty(String value)
public static boolean isNotEmpty(String value)
public static <T> T nonNullOrDefault(T newValue,
T defaultValue)
public static String toCodeString(net.datastream.schemas.mp_fields.CLASSID_Type classIdType)
public static String toCodeString(net.datastream.schemas.mp_fields.LOCATIONID_Type locationIdType)
public static Long convertBigIntegerToLong(BigInteger value)
Copyright © 2022 CERN European Organization for Nuclear Research. All rights reserved.