Search in sources :

Example 1 with SamplePurpose

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

the class HibernateSamplePurposeDaoIT method testGetUsage.

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

Example 2 with SamplePurpose

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

the class Dtos method to.

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

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

the class HibernateSamplePurposeDaoIT method getCreateItem.

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

Aggregations

SamplePurpose (uk.ac.bbsrc.tgac.miso.core.data.SamplePurpose)3 SamplePurposeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl)3 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 Test (org.junit.Test)1 AbstractHibernateSaveDaoTest (uk.ac.bbsrc.tgac.miso.AbstractHibernateSaveDaoTest)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