use of uk.ac.bbsrc.tgac.miso.core.data.impl.boxposition.LibraryAliquotBoxPosition 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.boxposition.LibraryAliquotBoxPosition in project miso-lims by miso-lims.
the class DefaultTransferService method loadChildEntities.
@Override
protected void loadChildEntities(Transfer object) throws IOException {
loadChildEntity(object.getSenderGroup(), object::setSenderGroup, groupService);
loadChildEntity(object.getSenderLab(), object::setSenderLab, labService);
loadChildEntity(object.getRecipientGroup(), object::setRecipientGroup, groupService);
for (TransferSample item : object.getSampleTransfers()) {
loadItem(item, item::setItem, sampleService, SampleBoxPosition::new, Sample::setBoxPosition);
}
for (TransferLibrary item : object.getLibraryTransfers()) {
loadItem(item, item::setItem, libraryService, LibraryBoxPosition::new, Library::setBoxPosition);
}
for (TransferLibraryAliquot item : object.getLibraryAliquotTransfers()) {
loadItem(item, item::setItem, libraryAliquotService, LibraryAliquotBoxPosition::new, LibraryAliquot::setBoxPosition);
}
for (TransferPool item : object.getPoolTransfers()) {
loadItem(item, item::setItem, poolService, PoolBoxPosition::new, Pool::setBoxPosition);
}
}
Aggregations