use of org.jaffa.datatypes.exceptions.FormatDateOnlyException in project jaffa-framework by jaffa-projects.
the class DateOnlyCriteriaField method parseAndAdd.
private static void parseAndAdd(String str, DateOnlyFieldMetaData meta, List values) throws FormatDateOnlyException {
try {
DateOnly parsedValue = null;
if (str != null && str.length() > 0) {
if (meta != null)
parsedValue = Parser.parseDateOnly(str, meta.getLayout());
else
parsedValue = Parser.parseDateOnly(str);
}
values.add(parsedValue);
} catch (FormatDateOnlyException e) {
e.setField(meta != null ? meta.getLabelToken() : "");
throw e;
}
}
Aggregations