use of uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl in project miso-lims by miso-lims.
the class LoadSequencerWorkflowTest method makePoolStep.
private PoolProgressStep makePoolStep(String alias, String name) {
Pool pool = new PoolImpl();
pool.setAlias(alias);
pool.setName(name);
PoolProgressStep step = new PoolProgressStep();
step.setInput(pool);
return step;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl in project miso-lims by miso-lims.
the class TestWorkflowTest method makePoolStep.
private PoolProgressStep makePoolStep(String alias, String name) {
PoolProgressStep step = new PoolProgressStep();
Pool pool = new PoolImpl();
pool.setAlias(alias);
pool.setName(name);
step.setInput(pool);
return step;
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.PoolImpl in project miso-lims by miso-lims.
the class DefaultWorkflowManagerTest method makePoolProgressStep.
private PoolProgressStep makePoolProgressStep(long id) {
Pool pool = new PoolImpl();
pool.setId(id);
PoolProgressStep step = new PoolProgressStep();
step.setInput(pool);
return step;
}
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 Transfer to(@Nonnull TransferDto from) {
Transfer to = new Transfer();
setLong(to::setId, from.getId(), false);
setString(to::setTransferRequestName, from.getTransferRequestName());
setDateTime(to::setTransferTime, from.getTransferTime());
setObject(to::setSenderLab, LabImpl::new, from.getSenderLabId());
setObject(to::setSenderGroup, Group::new, from.getSenderGroupId());
setString(to::setRecipient, from.getRecipient());
setObject(to::setRecipientGroup, Group::new, from.getRecipientGroupId());
addTransferItems(to::getSampleTransfers, from.getItems(), EntityType.SAMPLE, TransferSample::new, SampleImpl::new, SampleBoxPosition::new, Sample::setBoxPosition);
addTransferItems(to::getLibraryTransfers, from.getItems(), EntityType.LIBRARY, TransferLibrary::new, LibraryImpl::new, LibraryBoxPosition::new, Library::setBoxPosition);
addTransferItems(to::getLibraryAliquotTransfers, from.getItems(), EntityType.LIBRARY_ALIQUOT, TransferLibraryAliquot::new, LibraryAliquot::new, LibraryAliquotBoxPosition::new, LibraryAliquot::setBoxPosition);
addTransferItems(to::getPoolTransfers, from.getItems(), EntityType.POOL, TransferPool::new, PoolImpl::new, PoolBoxPosition::new, Pool::setBoxPosition);
return to;
}
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 Pool to(@Nonnull PoolDto dto) {
PoolImpl to = new PoolImpl();
setLong(to::setId, dto.getId(), false);
to.setAlias(dto.getAlias());
setBigDecimal(to::setConcentration, dto.getConcentration());
to.setConcentrationUnits(dto.getConcentrationUnits());
setInteger(to::setDnaSize, dto.getDnaSize(), true);
to.setCreationDate(parseDate(dto.getCreationDate()));
to.setDescription(dto.getDescription());
to.setIdentificationBarcode(dto.getIdentificationBarcode());
to.setDiscarded(dto.isDiscarded());
setBigDecimal(to::setVolume, dto.getVolume());
to.setVolumeUnits(dto.getVolumeUnits());
setObject(to::setPlatformType, dto.getPlatformType(), pt -> PlatformType.valueOf(pt));
if (dto.getPooledElements() != null) {
to.setPoolElements(dto.getPooledElements().stream().map(aliquot -> {
ListLibraryAliquotView view = new ListLibraryAliquotView();
view.setId(aliquot.getId());
view.setName(aliquot.getName());
setBigDecimal(view::setVolumeUsed, aliquot.getVolumeUsed());
PoolElement link = new PoolElement(to, view);
if (aliquot.getProportion() != null) {
link.setProportion(aliquot.getProportion());
}
return link;
}).collect(Collectors.toSet()));
}
to.setQcPassed(dto.getQcPassed());
to.setBoxPosition((PoolBoxPosition) makeBoxablePosition(dto, to));
if (dto.isMergeChild())
to.makeMergeChild();
return to;
}
Aggregations