Search in sources :

Example 1 with StainCategory

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

the class Dtos method to.

public static Stain to(@Nonnull StainDto from) {
    Stain to = new Stain();
    setLong(to::setId, from.getId(), false);
    setString(to::setName, from.getName());
    setObject(to::setCategory, StainCategory::new, from.getCategoryId());
    return to;
}
Also used : Stain(uk.ac.bbsrc.tgac.miso.core.data.Stain) StainCategory(uk.ac.bbsrc.tgac.miso.core.data.StainCategory) 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 StainCategory

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

the class Dtos method to.

public static StainCategory to(@Nonnull StainCategoryDto from) {
    StainCategory to = new StainCategory();
    setLong(to::setId, from.getId(), false);
    setString(to::setName, from.getName());
    return to;
}
Also used : StainCategory(uk.ac.bbsrc.tgac.miso.core.data.StainCategory) 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 3 with StainCategory

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

the class HibernateStainCategoryDaoIT method testUpdate.

@Test
public void testUpdate() throws IOException {
    long id = 1L;
    String name = "New Name";
    StainCategory cat = (StainCategory) getSessionFactory().getCurrentSession().get(StainCategory.class, id);
    assertNotEquals(name, cat.getName());
    cat.setName(name);
    sut.update(cat);
    clearSession();
    StainCategory saved = (StainCategory) getSessionFactory().getCurrentSession().get(StainCategory.class, id);
    assertEquals(name, saved.getName());
}
Also used : StainCategory(uk.ac.bbsrc.tgac.miso.core.data.StainCategory) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 4 with StainCategory

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

the class HibernateStainCategoryDaoIT method testCreate.

@Test
public void testCreate() throws IOException {
    String name = "New Category";
    StainCategory cat = new StainCategory();
    cat.setName(name);
    long savedId = sut.create(cat);
    clearSession();
    StainCategory saved = (StainCategory) getSessionFactory().getCurrentSession().get(StainCategory.class, savedId);
    assertEquals(name, saved.getName());
}
Also used : StainCategory(uk.ac.bbsrc.tgac.miso.core.data.StainCategory) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 5 with StainCategory

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

the class HibernateStainCategoryDaoIT method testGet.

@Test
public void testGet() throws IOException {
    long id = 1L;
    StainCategory cat = sut.get(id);
    assertNotNull(cat);
    assertEquals(id, cat.getId());
}
Also used : StainCategory(uk.ac.bbsrc.tgac.miso.core.data.StainCategory) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

StainCategory (uk.ac.bbsrc.tgac.miso.core.data.StainCategory)7 Test (org.junit.Test)5 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)5 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 Stain (uk.ac.bbsrc.tgac.miso.core.data.Stain)1