Class FileroValueConversion
java.lang.Object
de.aristaflow.adept2.extensions.filerodatasource.FileroValueConversion
This class provides value conversion from
FILERO data types to
ADEPT data types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SerializabletoAdeptDateValue(Object fileroValue, ZoneId zoneId) Converts the designated local date/time value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType.DATEusing the designated time zone to interpret the local date/time from FILERO.static SerializabletoAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType) Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType(a simple type, notProcessConstants.AdeptDataType.USERDEFINED).static SerializabletoAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType, String targetUdtName) Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType.static SerializabletoAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType, String targetUdtName, ZoneId zoneId) Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType.
-
Constructor Details
-
FileroValueConversion
public FileroValueConversion()
-
-
Method Details
-
toAdeptValue
public static Serializable toAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType) throws ConversionException Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType(a simple type, notProcessConstants.AdeptDataType.USERDEFINED).- Parameters:
fileroValue- The value from FILERO.targetDataType- The target ADEPT data type to which to convert the value.- Returns:
- The designated value converted to the designated ADEPT data type.
- Throws:
ConversionException- If the conversion cannot be done since the source or target type are incompatible, aConversionExceptionwill be thrown.
-
toAdeptDateValue
public static Serializable toAdeptDateValue(Object fileroValue, ZoneId zoneId) throws ConversionException Converts the designated local date/time value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType.DATEusing the designated time zone to interpret the local date/time from FILERO.- Parameters:
fileroValue- The local date/time value from FILERO.zoneId- The time zone applied to the FILERO value ornullto use the default time zone of the system.- Returns:
- The designated local date/time value converted to the designated ADEPT data type.
- Throws:
ConversionException- If the conversion cannot be done since the source or target type are incompatible, aConversionExceptionwill be thrown.
-
toAdeptValue
public static Serializable toAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType, String targetUdtName) throws ConversionException Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType. If the target type is a list and one element is a local date/time, the default system time zone will be applied.- Parameters:
fileroValue- The value from FILERO.targetDataType- The target ADEPT data type to which to convert the value.targetUdtName- The name of the UDT in case to convert toProcessConstants.AdeptDataType.USERDEFINED. This may benullforProcessConstants.AdeptDataType.USERDEFINEDand must benullfor all otherProcessConstants.AdeptDataType.- Returns:
- The designated value converted to the designated ADEPT data type.
- Throws:
ConversionException- If the conversion cannot be done since the source or target type are incompatible, aConversionExceptionwill be thrown.
-
toAdeptValue
public static Serializable toAdeptValue(Object fileroValue, ProcessConstants.AdeptDataType targetDataType, String targetUdtName, ZoneId zoneId) throws ConversionException Converts the designated value from aFILERO attributeto a value of the specified targetProcessConstants.AdeptDataType.- Parameters:
fileroValue- The value from FILERO.zoneId- The time zone applied to the FILERO value (may be a nested value) ornullto use the default time zone of the system.targetDataType- The target ADEPT data type to which to convert the value.targetUdtName- The name of the UDT in case to convert toProcessConstants.AdeptDataType.USERDEFINED. This may benullforProcessConstants.AdeptDataType.USERDEFINEDand must benullfor all otherProcessConstants.AdeptDataType.- Returns:
- The designated value converted to the designated ADEPT data type.
- Throws:
ConversionException- If the conversion cannot be done since the source or target type are incompatible, aConversionExceptionwill be thrown.
-