Search in sources :

Example 1 with DetailedQcStatus

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

the class Dtos method to.

public static DetailedQcStatus to(@Nonnull DetailedQcStatusDto from) {
    DetailedQcStatus to = new DetailedQcStatusImpl();
    setLong(to::setId, from.getId(), false);
    setBoolean(to::setStatus, from.getStatus(), true);
    setString(to::setDescription, from.getDescription());
    setBoolean(to::setNoteRequired, from.isNoteRequired(), false);
    return to;
}
Also used : DetailedQcStatus(uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus) DetailedQcStatusImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedQcStatusImpl) 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 DetailedQcStatus

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

the class HibernateDetailedQcStatusDaoIT method testGetUsageByLibraryAliquots.

@Test
public void testGetUsageByLibraryAliquots() throws IOException {
    DetailedQcStatus status = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, 1L);
    assertEquals("Passed", status.getDescription());
    assertEquals(0L, sut.getUsageByLibraryAliquots(status));
}
Also used : DetailedQcStatus(uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus) DetailedQcStatusImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedQcStatusImpl) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 3 with DetailedQcStatus

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

the class HibernateDetailedQcStatusDaoIT method testGetUsageBySamples.

@Test
public void testGetUsageBySamples() throws IOException {
    DetailedQcStatus status = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, 1L);
    assertEquals("Passed", status.getDescription());
    assertEquals(24L, sut.getUsageBySamples(status));
}
Also used : DetailedQcStatus(uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus) DetailedQcStatusImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedQcStatusImpl) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 4 with DetailedQcStatus

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

the class HibernateDetailedQcStatusDaoIT method testCreate.

@Test
public void testCreate() throws IOException {
    String desc = "Unknown";
    DetailedQcStatus status = new DetailedQcStatusImpl();
    status.setDescription(desc);
    status.setStatus(null);
    status.setNoteRequired(true);
    User user = (User) getSessionFactory().getCurrentSession().get(UserImpl.class, 1L);
    status.setChangeDetails(user);
    long savedId = sut.create(status);
    clearSession();
    DetailedQcStatus saved = (DetailedQcStatus) getSessionFactory().getCurrentSession().get(DetailedQcStatusImpl.class, savedId);
    assertEquals(desc, saved.getDescription());
}
Also used : User(com.eaglegenomics.simlims.core.User) DetailedQcStatus(uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus) DetailedQcStatusImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedQcStatusImpl) UserImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 5 with DetailedQcStatus

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

the class HibernateDetailedQcStatusDaoIT method testGet.

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

Aggregations

DetailedQcStatus (uk.ac.bbsrc.tgac.miso.core.data.DetailedQcStatus)9 Test (org.junit.Test)7 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)7 DetailedQcStatusImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.DetailedQcStatusImpl)7 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 User (com.eaglegenomics.simlims.core.User)1 UserImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl)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