use of uk.ac.bbsrc.tgac.miso.core.data.impl.view.ParentLibrary in project miso-lims by miso-lims.
the class PoolImplTest method addElement.
private void addElement(PoolImpl pool, Index index1, Index index2) {
ListLibraryAliquotView ldi = new ListLibraryAliquotView();
ldi.setParentLibrary(new ParentLibrary());
ldi.getParentLibrary().setIndex1(index1);
ldi.getParentLibrary().setIndex2(index2);
PoolElement element = new PoolElement(pool, ldi);
pool.getPoolContents().add(element);
}
use of uk.ac.bbsrc.tgac.miso.core.data.impl.view.ParentLibrary in project miso-lims by miso-lims.
the class Dtos method setEffectiveQcFailure.
private static void setEffectiveQcFailure(ListLibraryAliquotView from, UpstreamQcFailableDto to) {
for (ParentAliquot parent = from.getParentAliquot(); parent != null; parent = parent.getParentAliquot()) {
if (parent.getDetailedQcStatus() != null && Boolean.FALSE.equals(parent.getDetailedQcStatus().getStatus())) {
to.setEffectiveQcFailureId(parent.getDetailedQcStatus().getId());
to.setEffectiveQcFailureLevel(EntityType.LIBRARY_ALIQUOT.getLabel());
return;
}
}
ParentLibrary lib = from.getParentLibrary();
if (lib != null) {
if (lib.getDetailedQcStatus() != null && Boolean.FALSE.equals(lib.getDetailedQcStatus().getStatus())) {
to.setEffectiveQcFailureId(lib.getDetailedQcStatus().getId());
to.setEffectiveQcFailureLevel(EntityType.LIBRARY.getLabel());
return;
}
ParentSample sam = lib.getParentSample();
if (sam != null) {
if (sam.getDetailedQcStatus() != null && Boolean.FALSE.equals(sam.getDetailedQcStatus().getStatus())) {
to.setEffectiveQcFailureId(sam.getDetailedQcStatus().getId());
to.setEffectiveQcFailureLevel(sam.getParentSampleClass() == null ? EntityType.SAMPLE.getLabel() : sam.getParentSampleClass().getSampleCategory());
return;
}
for (GrandparentSample parent = sam.getParentSample(); parent != null; parent = parent.getParentSample()) {
if (sam.getDetailedQcStatus() != null && Boolean.FALSE.equals(sam.getDetailedQcStatus().getStatus())) {
to.setEffectiveQcFailureId(parent.getDetailedQcStatus().getId());
to.setEffectiveQcFailureLevel(parent.getParentSampleClass() == null ? EntityType.SAMPLE.getLabel() : parent.getParentSampleClass().getSampleCategory());
return;
}
}
}
}
}
Aggregations