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;
}
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;
}
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);
}
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);
}
Aggregations