Search in sources :

Example 1 with TissueMaterial

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

the class Dtos method to.

public static TissueMaterial to(@Nonnull TissueMaterialDto from) {
    TissueMaterial to = new TissueMaterialImpl();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    return to;
}
Also used : TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) TissueMaterial(uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial) IonTorrentRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto) QcHierarchyNodeDto(uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto) RunPositionDto(uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto) PacBioRunDto(uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto) Ls454RunDto(uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto) IlluminaNotificationDto(ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto) OxfordNanoporeRunDto(uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto) IlluminaRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto) NotificationDto(ca.on.oicr.gsi.runscanner.dto.NotificationDto) OxfordNanoporeNotificationDto(ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) SolidRunDto(uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto) OrderAliquotDto(uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)

Example 2 with TissueMaterial

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

the class Dtos method toTissueSample.

private static SampleTissue toTissueSample(@Nonnull SampleTissueDto from) {
    SampleTissue to = new SampleTissueImpl();
    to.setPassageNumber(from.getPassageNumber());
    to.setTimesReceived(from.getTimesReceived());
    to.setTubeNumber(from.getTubeNumber());
    to.setRegion(nullifyStringIfBlank(from.getRegion()));
    to.setSecondaryIdentifier(from.getSecondaryIdentifier());
    if (from.getTissueOriginId() != null) {
        TissueOrigin tissueOrigin = new TissueOriginImpl();
        tissueOrigin.setId(from.getTissueOriginId());
        to.setTissueOrigin(tissueOrigin);
    }
    if (from.getTissueTypeId() != null) {
        TissueType tissueType = new TissueTypeImpl();
        tissueType.setId(from.getTissueTypeId());
        to.setTissueType(tissueType);
    }
    if (from.getTissueMaterialId() != null) {
        TissueMaterial tissueMaterial = new TissueMaterialImpl();
        tissueMaterial.setId(from.getTissueMaterialId());
        to.setTissueMaterial(tissueMaterial);
    }
    if (from.getLabId() != null) {
        Lab lab = new LabImpl();
        lab.setId(from.getLabId());
        to.setLab(lab);
    }
    setString(to::setTimepoint, from.getTimepoint());
    return to;
}
Also used : SampleTissue(uk.ac.bbsrc.tgac.miso.core.data.SampleTissue) TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) TissueOrigin(uk.ac.bbsrc.tgac.miso.core.data.TissueOrigin) TissueType(uk.ac.bbsrc.tgac.miso.core.data.TissueType) TissueMaterial(uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial) TissueOriginImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueOriginImpl) LabImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.LabImpl) IonTorrentRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto) QcHierarchyNodeDto(uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto) RunPositionDto(uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto) PacBioRunDto(uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto) Ls454RunDto(uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto) IlluminaNotificationDto(ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto) OxfordNanoporeRunDto(uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto) IlluminaRunDto(uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto) NotificationDto(ca.on.oicr.gsi.runscanner.dto.NotificationDto) OxfordNanoporeNotificationDto(ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto) RunDto(uk.ac.bbsrc.tgac.miso.dto.run.RunDto) SolidRunDto(uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto) OrderAliquotDto(uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto) SampleTissueImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleTissueImpl) TissueTypeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueTypeImpl) Lab(uk.ac.bbsrc.tgac.miso.core.data.Lab)

Example 3 with TissueMaterial

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

the class HibernateTissueMaterialDaoIT method getCreateItem.

@Override
public TissueMaterial getCreateItem() {
    TissueMaterial material = new TissueMaterialImpl();
    material.setAlias("New Mat");
    User user = (User) currentSession().get(UserImpl.class, 1L);
    material.setChangeDetails(user);
    return material;
}
Also used : TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) User(com.eaglegenomics.simlims.core.User) TissueMaterial(uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial) UserImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl)

Example 4 with TissueMaterial

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

the class HibernateTissueMaterialDaoIT method testGetUsage.

@Test
public void testGetUsage() throws Exception {
    TissueMaterial material1 = (TissueMaterial) currentSession().get(TissueMaterialImpl.class, 1L);
    assertEquals(0, getTestSubject().getUsage(material1));
    TissueMaterial material2 = (TissueMaterial) currentSession().get(TissueMaterialImpl.class, 2L);
    assertEquals(2, getTestSubject().getUsage(material2));
}
Also used : TissueMaterialImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl) TissueMaterial(uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial) AbstractHibernateSaveDaoTest(uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest) Test(org.junit.Test)

Aggregations

TissueMaterial (uk.ac.bbsrc.tgac.miso.core.data.TissueMaterial)4 TissueMaterialImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.TissueMaterialImpl)4 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)2 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)2 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)2 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)2 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)2 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)2 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)2 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)2 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)2 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)2 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)2 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)2 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)2 User (com.eaglegenomics.simlims.core.User)1 Test (org.junit.Test)1 AbstractHibernateSaveDaoTest (uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest)1 Lab (uk.ac.bbsrc.tgac.miso.core.data.Lab)1 SampleTissue (uk.ac.bbsrc.tgac.miso.core.data.SampleTissue)1