Search in sources :

Example 1 with SampleAliquotSingleCell

use of uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell in project miso-lims by miso-lims.

the class AbstractBulkSampleIT method assertAllForSingleCellAliquot.

protected void assertAllForSingleCellAliquot(Map<String, String> aliquot, Long sampleId, boolean newlyCreated) {
    SampleAliquotSingleCell target = (SampleAliquotSingleCell) getSession().get(SampleAliquotSingleCellImpl.class, sampleId);
    assertPlainSampleAttributes(aliquot, target, newlyCreated);
    assertDetailedSampleAttributes(aliquot, target);
    assertAnalyteAttributes(aliquot, target);
    assertAliquotAttributes(aliquot, target);
    assertSingleCellAliquotAttributes(aliquot, target);
    if (newlyCreated) {
        SampleStockSingleCell stockParent = LimsUtils.getParent(SampleStockSingleCell.class, target);
        assertSingleCellStockAttributes(aliquot, stockParent);
        SampleSingleCell singleCellParent = LimsUtils.getParent(SampleSingleCell.class, target);
        assertSingleCellAttributes(aliquot, singleCellParent);
        SampleTissue tissueParent = LimsUtils.getParent(SampleTissue.class, target);
        assertTissueAttributes(aliquot, tissueParent);
    }
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) SampleAliquotSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell) SampleAliquotSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl) SampleStockSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell) SampleSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleSingleCell)

Example 2 with SampleAliquotSingleCell

use of uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell in project miso-lims by miso-lims.

the class Dtos method asAliquotSampleDto.

private static SampleAliquotDto asAliquotSampleDto(@Nonnull SampleAliquot from) {
    SampleAliquotDto dto = null;
    if (isAliquotSingleCellSample(from)) {
        SampleAliquotSingleCell scFrom = (SampleAliquotSingleCell) from;
        SampleAliquotSingleCellDto sc = new SampleAliquotSingleCellDto();
        setString(sc::setInputIntoLibrary, scFrom.getInputIntoLibrary());
        dto = sc;
    } else {
        dto = new SampleAliquotDto();
    }
    if (from.getSamplePurpose() != null) {
        dto.setSamplePurposeId(from.getSamplePurpose().getId());
    }
    return dto;
}
Also used : SampleAliquotSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell)

Example 3 with SampleAliquotSingleCell

use of uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell 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

SampleAliquotSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell)3 SampleAliquotSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl)2 SampleAliquot (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot)1 SampleSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleSingleCell)1 SampleStockSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleStockSingleCell)1 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)1 SampleAliquotImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)1 SampleAliquotRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl)1 SamplePurposeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl)1