Search in sources :

Example 1 with SopCategory

use of uk.ac.bbsrc.tgac.miso.core.data.impl.Sop.SopCategory in project miso-lims by miso-lims.

the class Dtos method to.

public static Sop to(@Nonnull SopDto from) {
    Sop to = new Sop();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    setString(to::setVersion, from.getVersion());
    setObject(to::setCategory, from.getCategory(), SopCategory::valueOf);
    setString(to::setUrl, from.getUrl());
    setBoolean(to::setArchived, from.isArchived(), false);
    return to;
}
Also used : Sop(uk.ac.bbsrc.tgac.miso.core.data.impl.Sop) SopCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.Sop.SopCategory) 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 SopCategory

use of uk.ac.bbsrc.tgac.miso.core.data.impl.Sop.SopCategory in project miso-lims by miso-lims.

the class HibernateSopDaoIT method testGetByAliasAndVersion.

@Test
public void testGetByAliasAndVersion() throws Exception {
    SopCategory category = SopCategory.SAMPLE;
    String alias = "Sample SOP 1";
    String version = "1.0";
    Sop sop = getTestSubject().get(category, alias, version);
    assertNotNull(sop);
    assertEquals(category, sop.getCategory());
    assertEquals(alias, sop.getAlias());
    assertEquals(version, sop.getVersion());
}
Also used : Sop(uk.ac.bbsrc.tgac.miso.core.data.impl.Sop) SopCategory(uk.ac.bbsrc.tgac.miso.core.data.impl.Sop.SopCategory) AbstractHibernateSaveDaoTest(uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest) Test(org.junit.Test)

Aggregations

Sop (uk.ac.bbsrc.tgac.miso.core.data.impl.Sop)2 SopCategory (uk.ac.bbsrc.tgac.miso.core.data.impl.Sop.SopCategory)2 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)1 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)1 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)1 Test (org.junit.Test)1 AbstractHibernateSaveDaoTest (uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest)1 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)1 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)1 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)1 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)1 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)1 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)1 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)1 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)1 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)1 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)1