final HolidaySearchResult result = master.search(request);
if (result.getFirstDocument() != null) {
//System.out.println("Updating " + calendar.getType());
final HolidayDocument document = result.getFirstDocument();
document.setHoliday(calendar);
master.update(document);
} else {
//System.out.println("Adding " + calendar.getType());
master.add(new HolidayDocument(calendar));
}
}