I'm encoding my payload into a OMM Message. The old RFA had a utility function in the `OMMEncoder` class, where one could pass a value as `String` and an `OMMType`:
String fvalue = field.getValue(); FidDef fidDef = fieldDict.getFidDef(fname); encoder.encodeString(fvalue, fidDef.getOMMType());
The encoder encoded the string respectively. Now, I'm wondering is there a similar utility function in the EMA API? Currently I'm handling each case in a separate statement
switch (fieldDictDto.rwfType()) { case DataTypes.ENUM -> { // Handle enum } case DataTypes.DATE -> { var date = Utils.localDateFromString(fieldValue); fieldEntry.date(fid, date.getYear(), date.getMonthValue(), date.getDayOfMonth()); } case ... -> { /*handle more cases*/ }