calcConfigNames.add(deserializer.fieldValueToObject(String.class, field));
}
} else {
calcConfigNames = null;
}
FudgeField namesField = msg.getByName(NAMES);
Set<String> names;
if (namesField != null) {
FudgeMsg namesMsg = (FudgeMsg) namesField.getValue();
names = Sets.newHashSet();
for (FudgeField field : namesMsg) {
names.add(deserializer.fieldValueToObject(String.class, field));
}
} else {
names = null;
}
FudgeField currenciesField = msg.getByName(CURRENCIES);
Set<Currency> currencies;
if (currenciesField != null) {
FudgeMsg currenciesMsg = (FudgeMsg) currenciesField.getValue();
currencies = Sets.newHashSet();
for (FudgeField field : currenciesMsg) {
currencies.add(Currency.of(deserializer.fieldValueToObject(String.class, field)));
}
} else {
currencies = null;
}
Pattern nameMatchPattern;
FudgeField namePatternField = msg.getByName(NAME_MATCH_PATTERN);
if (namePatternField != null) {
String regex = deserializer.fieldValueToObject(String.class, namePatternField);
nameMatchPattern = Pattern.compile(regex);
} else {
nameMatchPattern = null;
}
Pattern nameLikePattern;
FudgeField nameLikeField = msg.getByName(NAME_LIKE_PATTERN);
if (nameLikeField != null) {
String regex = deserializer.fieldValueToObject(String.class, nameLikeField);
nameLikePattern = Pattern.compile(regex);
} else {
nameLikePattern = null;