use of uk.ac.bbsrc.tgac.miso.core.data.impl.SampleStockRnaImpl in project miso-lims by miso-lims.
the class Dtos method toStockSample.
private static SampleStock toStockSample(@Nonnull SampleStockDto from) {
SampleStock to = null;
if (from instanceof SampleStockSingleCellRelative) {
SampleStockSingleCellRelative scFrom = (SampleStockSingleCellRelative) from;
SampleStockSingleCell sc = new SampleStockSingleCellImpl();
setBigDecimal(sc::setTargetCellRecovery, scFrom.getTargetCellRecovery());
setBigDecimal(sc::setCellViability, scFrom.getCellViability());
setBigDecimal(sc::setLoadingCellConcentration, scFrom.getLoadingCellConcentration());
to = sc;
} else if (from instanceof SampleStockRnaRelative) {
SampleStockRnaRelative rnaFrom = (SampleStockRnaRelative) from;
SampleStockRna rna = new SampleStockRnaImpl();
setBoolean(rna::setDnaseTreated, rnaFrom.getDnaseTreated(), true);
to = rna;
} else {
to = new SampleStockImpl();
}
if (from.getStrStatus() != null) {
to.setStrStatus(from.getStrStatus());
}
setInteger(to::setSlidesConsumed, from.getSlidesConsumed(), true);
setObject(to::setReferenceSlide, SampleSlideImpl::new, from.getReferenceSlideId());
return to;
}
Aggregations