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);
}
}
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;
}
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;
}
Aggregations