Arrays.asList(new Sample().setId("1"), new Sample().setId("2")), 2, null) .setAttributes(new HashMap<>()); cohort.setUid(200).setStatus(new Cohort.CohortStatus("CALCULATING")).setAnnotationSets(AnnotationHelper.createAnnotation()); CohortSolrModel cohortSolrModel = new CatalogCohortToSolrCohortConverter(study).convertToStorageType(cohort);
cohort.setRelease(studyManager.getCurrentRelease(study, userId)); cohort.setStats(ParamUtils.defaultObject(cohort.getStats(), Collections::emptyMap)); cohort.setStatus(ParamUtils.defaultObject(cohort.getStatus(), Cohort.CohortStatus::new)); cohort.setSamples(ParamUtils.defaultObject(cohort.getSamples(), Collections::emptyList));