- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
@Transactional(propagation = Propagation.REQUIRES_NEW) /** * Hide all the given cvs with the given message */ public void hideTerms(Collection<CvObject> cvs, String message){ DaoFactory factory = IntactContext.getCurrentInstance().getDaoFactory(); AnnotationDao annDao = factory.getAnnotationDao(); for (CvObject cv : cvs){ cv = factory.getEntityManager().merge(cv); boolean hasHidden = false; for (Annotation annotation : cv.getAnnotations()){ if (annotation.getCvTopic() != null && CvTopic.HIDDEN.equalsIgnoreCase(annotation.getCvTopic().getShortLabel())){ hasHidden = true; } } if (!hasHidden){ annDao.persist(CvUpdateUtils.hideTerm(cv, message)); } } }
IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getAnnotationDao().persist( annotation );
if ( ! experiment.getAnnotations().contains( annotation ) ) { IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getAnnotationDao().persist( annotation ); experiment.addAnnotation( annotation ); IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getExperimentDao().update( experiment );
annotationDao.persist(created);