Search in sources :

Example 11 with PoolImpl

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

the class HibernateProgressDaoIT method makePoolProgressStep.

private PoolProgressStep makePoolProgressStep(long poolId, int stepNumber) {
    PoolProgressStep step = new PoolProgressStep();
    Pool pool = new PoolImpl();
    pool.setId(poolId);
    step.setInput(pool);
    step.setStepNumber(stepNumber);
    return step;
}
Also used : Pool(uk.ac.bbsrc.tgac.miso.core.data.Pool) PoolImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl) PoolProgressStep(uk.ac.bbsrc.tgac.miso.core.data.workflow.impl.PoolProgressStep)

Example 12 with PoolImpl

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

the class Dtos method to.

public static PoolOrder to(@Nonnull PoolOrderDto from) {
    PoolOrder to = new PoolOrder();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    setString(to::setDescription, from.getDescription());
    setObject(to::setPurpose, RunPurpose::new, from.getPurposeId());
    setInteger(to::setPartitions, from.getPartitions(), true);
    setObject(to::setContainerModel, SequencingContainerModel::new, from.getContainerModelId());
    setObject(to::setParameters, SequencingParameters::new, from.getParametersId());
    setBoolean(to::setDraft, from.isDraft(), false);
    if (from.getOrderAliquots() != null) {
        to.setOrderLibraryAliquots(from.getOrderAliquots().stream().map(libDto -> {
            OrderLibraryAliquot lib = Dtos.to(libDto);
            lib.setPoolOrder(to);
            return lib;
        }).collect(Collectors.toSet()));
    }
    setObject(to::setPool, PoolImpl::new, from.getPoolId());
    setObject(to::setSequencingOrder, SequencingOrderImpl::new, from.getSequencingOrderId());
    return to;
}
Also used : PoolOrder(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolOrder) RunPurpose(uk.ac.bbsrc.tgac.miso.core.data.impl.RunPurpose) SequencingContainerModel(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingContainerModel) OrderLibraryAliquot(uk.ac.bbsrc.tgac.miso.core.data.impl.OrderLibraryAliquot) SequencingParameters(uk.ac.bbsrc.tgac.miso.core.data.SequencingParameters) 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) PoolImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl) SequencingOrderImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SequencingOrderImpl)

Example 13 with PoolImpl

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

the class HibernatePoolDaoIT method testSaveEmptyWithNotes.

@Test
public void testSaveEmptyWithNotes() throws Exception {
    final Date creationDate = new Date();
    final PoolImpl saveMe = getATestPool(1, creationDate, true, 10);
    final long rtn = dao.save(saveMe);
    // check they're actually the same
    Pool freshPool = dao.get(rtn);
    compareFields(saveMe, freshPool);
}
Also used : Pool(uk.ac.bbsrc.tgac.miso.core.data.Pool) PoolImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl) Date(java.util.Date) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Example 14 with PoolImpl

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

the class HibernatePoolDaoIT method testChangeLogFunctionality.

@Test
public void testChangeLogFunctionality() throws Exception {
    PoolImpl testPool = getATestPool(1, new Date(), false, 0);
    dao.save(testPool);
    testPool.setConcentration(new BigDecimal("5"));
    testPool.setName("Test Pool xxx");
    testPool.setIdentificationBarcode("Foob");
    testPool.setCreationTime(new Date());
    testPool.setPlatformType(PlatformType.IONTORRENT);
    testPool.setAlias("Alias changed");
    testPool.setDiscarded(true);
    testPool.setVolume(new BigDecimal("10"));
    testPool.setQcPassed(true);
    testPool.setDescription("Description changed");
    User user = new UserImpl();
    user.setId(1L);
    testPool.setLastModifier(user);
    dao.save(testPool);
}
Also used : User(com.eaglegenomics.simlims.core.User) UserImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.UserImpl) PoolImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl) Date(java.util.Date) BigDecimal(java.math.BigDecimal) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest) Test(org.junit.Test)

Aggregations

PoolImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl)14 Pool (uk.ac.bbsrc.tgac.miso.core.data.Pool)10 Date (java.util.Date)5 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)4 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)4 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)4 Test (org.junit.Test)4 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)4 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)4 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)4 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)4 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)4 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)4 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)4 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)4 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)4 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)4 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)4 User (com.eaglegenomics.simlims.core.User)2 DetailedLibrary (uk.ac.bbsrc.tgac.miso.core.data.DetailedLibrary)2