Search in sources :

Example 1 with ReferenceGenomeImpl

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

the class DefaultSampleServiceTest method humanReferenceGenome.

private ReferenceGenome humanReferenceGenome() {
    ReferenceGenome referenceGenome = new ReferenceGenomeImpl();
    referenceGenome.setAlias("hg19");
    referenceGenome.setId(1L);
    return referenceGenome;
}
Also used : ReferenceGenomeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.ReferenceGenomeImpl) ReferenceGenome(uk.ac.bbsrc.tgac.miso.core.data.ReferenceGenome)

Example 2 with ReferenceGenomeImpl

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

the class Dtos method to.

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

Example 3 with ReferenceGenomeImpl

use of uk.ac.bbsrc.tgac.miso.core.data.impl.ReferenceGenomeImpl 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 4 with ReferenceGenomeImpl

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

the class HibernateReferenceGenomeDaoIT method testCreate.

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

Example 5 with ReferenceGenomeImpl

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

the class Dtos method to.

public static Subproject to(@Nonnull SubprojectDto from) {
    Subproject to = new SubprojectImpl();
    setLong(to::setId, from.getId(), false);
    setString(to::setAlias, from.getAlias());
    setString(to::setDescription, from.getDescription());
    setBoolean(to::setPriority, from.getPriority(), true);
    setObject(to::setReferenceGenome, ReferenceGenomeImpl::new, from.getReferenceGenomeId());
    setObject(to::setParentProject, ProjectImpl::new, from.getParentProjectId());
    return to;
}
Also used : Subproject(uk.ac.bbsrc.tgac.miso.core.data.Subproject) ReferenceGenomeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.ReferenceGenomeImpl) SampleNumberPerProjectImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleNumberPerProjectImpl) ProjectImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.ProjectImpl) SubprojectImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SubprojectImpl) 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)

Aggregations

ReferenceGenomeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.ReferenceGenomeImpl)6 ReferenceGenome (uk.ac.bbsrc.tgac.miso.core.data.ReferenceGenome)4 IlluminaNotificationDto (ca.on.oicr.gsi.runscanner.dto.IlluminaNotificationDto)3 NotificationDto (ca.on.oicr.gsi.runscanner.dto.NotificationDto)3 OxfordNanoporeNotificationDto (ca.on.oicr.gsi.runscanner.dto.OxfordNanoporeNotificationDto)3 OrderAliquotDto (uk.ac.bbsrc.tgac.miso.dto.PoolOrderDto.OrderAliquotDto)3 QcHierarchyNodeDto (uk.ac.bbsrc.tgac.miso.dto.dashi.QcHierarchyNodeDto)3 IlluminaRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IlluminaRunDto)3 IonTorrentRunDto (uk.ac.bbsrc.tgac.miso.dto.run.IonTorrentRunDto)3 Ls454RunDto (uk.ac.bbsrc.tgac.miso.dto.run.Ls454RunDto)3 OxfordNanoporeRunDto (uk.ac.bbsrc.tgac.miso.dto.run.OxfordNanoporeRunDto)3 PacBioRunDto (uk.ac.bbsrc.tgac.miso.dto.run.PacBioRunDto)3 RunDto (uk.ac.bbsrc.tgac.miso.dto.run.RunDto)3 RunPositionDto (uk.ac.bbsrc.tgac.miso.dto.run.RunPositionDto)3 SolidRunDto (uk.ac.bbsrc.tgac.miso.dto.run.SolidRunDto)3 ProjectImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.ProjectImpl)2 SampleNumberPerProjectImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleNumberPerProjectImpl)2 User (com.eaglegenomics.simlims.core.User)1 Date (java.util.Date)1 Before (org.junit.Before)1