Search in sources :

Example 1 with Pipeline

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

the class Dtos method to.

public static Project to(@Nonnull ProjectDto dto) {
    Project to = new ProjectImpl();
    setLong(to::setId, dto.getId(), false);
    setString(to::setName, dto.getName());
    setDate(to::setCreationTime, dto.getCreationDate());
    setString(to::setAlias, dto.getAlias());
    setString(to::setShortName, dto.getShortName());
    setString(to::setDescription, dto.getDescription());
    setObject(to::setStatus, dto.getStatus(), (key) -> StatusType.get(key));
    setObject(to::setReferenceGenome, ReferenceGenomeImpl::new, dto.getReferenceGenomeId());
    setObject(to::setDefaultTargetedSequencing, TargetedSequencing::new, dto.getDefaultTargetedSequencingId());
    setObject(to::setPipeline, Pipeline::new, dto.getPipelineId());
    setBoolean(to::setSecondaryNaming, dto.isSecondaryNaming(), false);
    setString(to::setRebNumber, dto.getRebNumber());
    setDate(to::setRebExpiry, dto.getRebExpiry());
    setInteger(to::setSamplesExpected, dto.getSamplesExpected(), true);
    if (dto.getContactId() != null || !isStringEmptyOrNull(dto.getContactName()) || !isStringEmptyOrNull(dto.getContactEmail())) {
        Contact contact = new Contact();
        setLong(contact::setId, dto.getContactId(), false);
        setString(contact::setName, dto.getContactName());
        setString(contact::setEmail, dto.getContactEmail());
        to.setContact(contact);
    }
    return to;
}
Also used : ReferenceGenomeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.ReferenceGenomeImpl) SampleNumberPerProject(uk.ac.bbsrc.tgac.miso.core.data.SampleNumberPerProject) Project(uk.ac.bbsrc.tgac.miso.core.data.Project) SampleNumberPerProjectImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleNumberPerProjectImpl) ProjectImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.ProjectImpl) TargetedSequencing(uk.ac.bbsrc.tgac.miso.core.data.impl.TargetedSequencing) 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) Pipeline(uk.ac.bbsrc.tgac.miso.core.data.impl.Pipeline) Contact(uk.ac.bbsrc.tgac.miso.core.data.impl.Contact)

Example 2 with Pipeline

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

the class HibernatePipelineDaoIT method getCreateItem.

@Override
public Pipeline getCreateItem() {
    Pipeline pipeline = new Pipeline();
    pipeline.setAlias("New Pipeline");
    return pipeline;
}
Also used : Pipeline(uk.ac.bbsrc.tgac.miso.core.data.impl.Pipeline)

Example 3 with Pipeline

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

the class HibernateProjectDaoIT method testSave.

/**
 * Test method for {@link uk.ac.bbsrc.tgac.miso.persistence.impl.HibernateProjectDao#save(uk.ac.bbsrc.tgac.miso.core.data.Project)} .
 */
@Test
public void testSave() throws Exception {
    Pipeline pipeline = (Pipeline) currentSession().get(Pipeline.class, 1L);
    final String testAlias = "test alias";
    project.setAlias(testAlias);
    project.setPipeline(pipeline);
    long savedProjectId = projectDAO.save(project);
    Project savedProject = projectDAO.get(savedProjectId);
    assertEquals(testAlias, savedProject.getAlias());
}
Also used : Project(uk.ac.bbsrc.tgac.miso.core.data.Project) Pipeline(uk.ac.bbsrc.tgac.miso.core.data.impl.Pipeline) Test(org.junit.Test) AbstractDAOTest(uk.ac.bbsrc.tgac.miso.AbstractDAOTest)

Example 4 with Pipeline

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

the class Dtos method to.

public static Pipeline to(@Nonnull PipelineDto from) {
    Pipeline to = new Pipeline();
    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) Pipeline(uk.ac.bbsrc.tgac.miso.core.data.impl.Pipeline)

Aggregations

Pipeline (uk.ac.bbsrc.tgac.miso.core.data.impl.Pipeline)4 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 Project (uk.ac.bbsrc.tgac.miso.core.data.Project)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 Test (org.junit.Test)1 AbstractDAOTest (uk.ac.bbsrc.tgac.miso.AbstractDAOTest)1 SampleNumberPerProject (uk.ac.bbsrc.tgac.miso.core.data.SampleNumberPerProject)1 Contact (uk.ac.bbsrc.tgac.miso.core.data.impl.Contact)1 ProjectImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.ProjectImpl)1