Search in sources :

Example 6 with BoxUse

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

the class Dtos method to.

public static BoxUse to(@Nonnull BoxUseDto from) {
    BoxUse to = new BoxUse();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    return to;
}
Also used : 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) BoxUse(uk.ac.bbsrc.tgac.miso.core.data.BoxUse)

Example 7 with BoxUse

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

the class BoxRestControllerTest method makeEmptyBox.

private Box makeEmptyBox() {
    Box box = new BoxImpl();
    box.setId(1L);
    box.setAlias("box");
    BoxSize size = new BoxSize();
    size.setRows(8);
    size.setColumns(12);
    box.setSize(size);
    BoxUse use = new BoxUse();
    use.setAlias("use");
    box.setUse(use);
    box.setLocationBarcode("freezer");
    User user = new UserImpl();
    user.setId(1L);
    box.setLastModifier(user);
    return box;
}
Also used : User(com.eaglegenomics.simlims.core.User) BoxImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.BoxImpl) UserImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl) Box(uk.ac.bbsrc.tgac.miso.core.data.Box) BoxSize(uk.ac.bbsrc.tgac.miso.core.data.BoxSize) BoxUse(uk.ac.bbsrc.tgac.miso.core.data.BoxUse)

Example 8 with BoxUse

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

the class HibernateBoxUseDaoIT method testGet.

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

Example 9 with BoxUse

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

the class HibernateBoxUseDaoIT method testGetByAlias.

@Test
public void testGetByAlias() throws IOException {
    String alias = "boxuse2";
    BoxUse boxUse = sut.getByAlias(alias);
    assertNotNull(boxUse);
    assertEquals(alias, boxUse.getAlias());
}
Also used : BoxUse(uk.ac.bbsrc.tgac.miso.core.data.BoxUse) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 10 with BoxUse

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

the class HibernateBoxUseDaoIT method testCreate.

@Test
public void testCreate() throws IOException {
    String alias = "New BoxUse";
    BoxUse boxUse = new BoxUse();
    boxUse.setAlias(alias);
    long savedId = sut.create(boxUse);
    clearSession();
    BoxUse saved = (BoxUse) getSessionFactory().getCurrentSession().get(BoxUse.class, savedId);
    assertEquals(alias, saved.getAlias());
}
Also used : BoxUse(uk.ac.bbsrc.tgac.miso.core.data.BoxUse) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

BoxUse (uk.ac.bbsrc.tgac.miso.core.data.BoxUse)11 Test (org.junit.Test)6 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)6 Box (uk.ac.bbsrc.tgac.miso.core.data.Box)3 BoxSize (uk.ac.bbsrc.tgac.miso.core.data.BoxSize)3 BoxImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.BoxImpl)3 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 UserImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl)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