Search in sources :

Example 1 with SampleAliquotSingleCellImpl

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;
}
Also used : SampleAliquotSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell) SampleAliquot(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot) SampleAliquotRnaImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl) SamplePurposeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl) SampleAliquotSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl) SampleAliquotImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)

Aggregations

SampleAliquot (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot)1 SampleAliquotSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell)1 SampleAliquotImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)1 SampleAliquotRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl)1 SampleAliquotSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl)1 SamplePurposeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl)1