+ static Logger logger = Logger.getLogger(ReferenceServiceImpl.class);\r
+\r
+ @Autowired\r
+ private ICdmGenericDao genericDao;\r
+ /**\r
+ * Constructor\r
+ */\r
+ public ReferenceServiceImpl(){\r
+ if (logger.isDebugEnabled()) { logger.debug("Load ReferenceService Bean"); }\r
+ }\r
+\r
+ @Override\r
+ @Transactional(readOnly = false)\r
+ public void updateTitleCache(Class<? extends Reference> clazz, Integer stepSize, IIdentifiableEntityCacheStrategy<Reference> cacheStrategy, IProgressMonitor monitor) {\r
+ if (clazz == null){\r
+ clazz = Reference.class;\r
+ }\r
+ super.updateTitleCacheImpl(clazz, stepSize, cacheStrategy, monitor);\r
+ }\r
+\r
+\r
+ @Override\r
+ protected void setOtherCachesNull(Reference ref) {\r
+ if (! ref.isProtectedAbbrevTitleCache()){\r
+ ref.setAbbrevTitleCache(null, false);\r
+ }\r
+ }\r
+\r
+\r
+ @Override\r
+ @Autowired\r
+ protected void setDao(IReferenceDao dao) {\r
+ this.dao = dao;\r
+ }\r
+\r
+ @Override\r
+ public List<UuidAndTitleCache<Reference>> getUuidAndTitle() {\r
+\r
+ return dao.getUuidAndTitle();\r
+ }\r
+\r
+ @Override\r
+ public List<Reference> getAllReferencesForPublishing(){\r
+ return dao.getAllNotNomenclaturalReferencesForPublishing();\r
+ }\r
+\r
+ @Override\r
+ public List<Reference> getAllNomenclaturalReferences() {\r
+\r
+ return dao.getAllNomenclaturalReferences();\r
+ }\r
+\r
+ @Override\r
+ public List<TaxonBase> listCoveredTaxa(Reference reference, boolean includeSubordinateReferences, List<String> propertyPaths) {\r
+\r
+ List<TaxonBase> taxonList = dao.listCoveredTaxa(reference, includeSubordinateReferences, null, propertyPaths);\r
+\r
+ return taxonList;\r
+ }\r
+\r
+ @Override\r
+ public DeleteResult delete(Reference reference) {\r
+ //check whether the reference is used somewhere\r
+ DeleteResult result = isDeletable(reference, null);\r
+\r
+ if (result.isOk()){\r
+ dao.delete(reference);\r
+ }\r
+\r
+ return result;\r
+ }\r
+\r
+ @Override\r
+ @Transactional(readOnly=false)\r
+ public DeleteResult delete(UUID referenceUuid) {\r
+ return delete(dao.load(referenceUuid));\r
+ }\r