use of uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl in project miso-lims by miso-lims.
the class Dtos method toAliquotSample.
private static SampleAliquot toAliquotSample(@Nonnull SampleAliquotDto from) {
SampleAliquot to = null;
if (from.getClass() == SampleAliquotSingleCellDto.class) {
SampleAliquotSingleCellDto scFrom = (SampleAliquotSingleCellDto) from;
SampleAliquotSingleCell sc = new SampleAliquotSingleCellImpl();
setBigDecimal(sc::setInputIntoLibrary, scFrom.getInputIntoLibrary());
to = sc;
} else if (from.getClass() == SampleAliquotRnaDto.class) {
to = new SampleAliquotRnaImpl();
} else {
to = new SampleAliquotImpl();
}
if (from.getSamplePurposeId() != null) {
to.setSamplePurpose(new SamplePurposeImpl());
to.getSamplePurpose().setId(from.getSamplePurposeId());
}
return to;
}
Aggregations