public static SampleDto asMinimalDto(@Nonnull Sample from) { DetailedSampleDto dto = new DetailedSampleDto(); copySampleFields(from, dto, false); if (isDetailedSample(from)) { DetailedSample detailed = (DetailedSample) from; dto.setSampleClassId(detailed.getSampleClass().getId()); dto.setCreationDate(detailed.getCreationDate() == null ? "" : formatDate(detailed.getCreationDate())); dto.setIdentityConsentLevel(getIdentityConsentLevelString(detailed)); if (detailed.getSubproject() != null) { dto.setSubprojectAlias(detailed.getSubproject().getAlias()); dto.setSubprojectPriority(detailed.getSubproject().getPriority()); } } return dto; }
dto.setSynthetic(from.isSynthetic()); dto.setCreationDate(from.getCreationDate() == null ? "" : formatDate(from.getCreationDate())); dto.setNonStandardAlias(from.hasNonStandardAlias()); if (from.getDetailedQcStatus() != null) {
dTarget.setGroupDescription(dSource.getGroupDescription()); dTarget.setGroupId(dSource.getGroupId()); dTarget.setCreationDate(dSource.getCreationDate());