DbHolidayMaster extends AbstractDocumentDbMaster<HolidayDocument> implements HolidayMaster { @Override public HolidayDocument get(final UniqueId uniqueId) { return doGet(uniqueId, new HolidayDocumentExtractor(), "Holiday"); } DbHolidayMaster(final DbConnector dbConnector); @Override void registerMetrics(MetricRegistry summaryRegistry, MetricRegistry detailedRegistry, String namePrefix); @Override HolidayMetaDataResult metaData(HolidayMetaDataRequest request); @Override HolidaySearchResult search(final HolidaySearchRequest request); @Override HolidayDocument get(final UniqueId uniqueId); @Override HolidayDocument get(final ObjectIdentifiable objectId, final VersionCorrection versionCorrection); @Override HolidayHistoryResult history(final HolidayHistoryRequest request); static final String IDENTIFIER_SCHEME_DEFAULT; }
@Test public void test_example() throws Exception { ManageableHoliday hol = new ManageableHoliday(Currency.GBP, Arrays.asList(LocalDate.of(2010, 2, 3))); HolidayDocument addDoc = new HolidayDocument(hol); HolidayDocument added = _holMaster.add(addDoc); HolidayDocument loaded = _holMaster.get(added.getUniqueId()); assertEquals(added, loaded); }