Search in sources :

Example 1 with SamplePurposeImpl

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

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

the class Dtos method toAliquotSample.

private static SampleAliquot toAliquotSample(@Nonnull SampleAliquotDto from) {
    SampleAliquot to = null;
    if (from.getClass() == SampleAliquotSingleCellDto.class) {
        SampleAliquotSingleCellDto scFrom = (SampleAliquotSingleCellDto) from;
        SampleAliquotSingleCell sc = new SampleAliquotSingleCellImpl();
        setBigDecimal(sc::setInputIntoLibrary, scFrom.getInputIntoLibrary());
        to = sc;
    } else if (from.getClass() == SampleAliquotRnaDto.class) {
        to = new SampleAliquotRnaImpl();
    } else {
        to = new SampleAliquotImpl();
    }
    if (from.getSamplePurposeId() != null) {
        to.setSamplePurpose(new SamplePurposeImpl());
        to.getSamplePurpose().setId(from.getSamplePurposeId());
    }
    return to;
}
Also used : SampleAliquotSingleCell(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell) SampleAliquot(uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot) SampleAliquotRnaImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl) SamplePurposeImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl) SampleAliquotSingleCellImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl) SampleAliquotImpl(uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)

Example 3 with SamplePurposeImpl

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

SamplePurposeImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SamplePurposeImpl)3 SamplePurpose (uk.ac.bbsrc.tgac.miso.core.data.SamplePurpose)2 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 SampleAliquot (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquot)1 SampleAliquotSingleCell (uk.ac.bbsrc.tgac.miso.core.data.SampleAliquotSingleCell)1 SampleAliquotImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotImpl)1 SampleAliquotRnaImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotRnaImpl)1 SampleAliquotSingleCellImpl (uk.ac.bbsrc.tgac.miso.core.data.impl.SampleAliquotSingleCellImpl)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