use of uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType in project miso-lims by miso-lims.
the class Dtos method toTissuePieceSample.
private static SampleTissuePiece toTissuePieceSample(@Nonnull SampleTissuePieceDto from) {
SampleTissuePiece to = new SampleTissuePieceImpl();
TissuePieceType tissuePieceType = new TissuePieceType();
tissuePieceType.setId(from.getTissuePieceTypeId());
to.setTissuePieceType(tissuePieceType);
to.setSlidesConsumed(from.getSlidesConsumed());
setObject(to::setReferenceSlide, SampleSlideImpl::new, from.getReferenceSlideId());
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType in project miso-lims by miso-lims.
the class Dtos method to.
public static TissuePieceType to(@Nonnull TissuePieceTypeDto from) {
TissuePieceType to = new TissuePieceType();
if (from.getId() != null)
to.setId(from.getId());
setString(to::setName, from.getName());
setString(to::setAbbreviation, from.getAbbreviation());
setString(to::setV2NamingCode, from.getV2NamingCode());
setBoolean(to::setArchived, from.isArchived(), false);
return to;
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType in project miso-lims by miso-lims.
the class V2SampleAliasGeneratorTest method makeLcmTube.
private SampleTissuePiece makeLcmTube() {
SampleTissuePiece lcmTube = new SampleTissuePieceImpl();
SampleTissue tissue = makeTissue();
tissue.setAlias("PROJ_0001_01");
lcmTube.setParent(tissue);
lcmTube.setSiblingNumber(2);
SampleClass sc = new SampleClassImpl();
sc.setSampleCategory(SampleTissueProcessing.CATEGORY_NAME);
lcmTube.setSampleClass(sc);
TissuePieceType pieceType = new TissuePieceType();
pieceType.setV2NamingCode("TL");
lcmTube.setTissuePieceType(pieceType);
return lcmTube;
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType in project miso-lims by miso-lims.
the class HibernateTissuePieceTypeDaoIT method testGetUsageByTissuePieces.
@Test
public void testGetUsageByTissuePieces() throws IOException {
TissuePieceType type = (TissuePieceType) getSessionFactory().getCurrentSession().get(TissuePieceType.class, 1L);
assertEquals("LCM Tube", type.getName());
assertEquals(0L, sut.getUsage(type));
}
use of uk.ac.bbsrc.tgac.miso.core.data.type.TissuePieceType in project miso-lims by miso-lims.
the class HibernateTissuePieceTypeDaoIT method testGet.
@Test
public void testGet() throws IOException {
long id = 1L;
TissuePieceType type = sut.get(id);
assertNotNull(type);
assertEquals(id, type.getId());
}
Aggregations