qp.getUnitCvRef().setPrimaryKey(key);
}
// check all Thresholds
for(Iterator<Threshold> thresholdIt = qp.getThresholdIterator(); thresholdIt.hasNext(); ) {
Threshold threshold = thresholdIt.next();
if(threshold.getCvRef() != null && threshold.getCvRef().getPrimaryKey() == 0) {
Integer key = cvIds.get(threshold.getCvRef().getId());
if(key != null)
threshold.getCvRef().setPrimaryKey(key);
}
if(threshold.getUnitCvRef() != null && threshold.getUnitCvRef().getPrimaryKey() == 0) {
Integer key = cvIds.get(threshold.getUnitCvRef().getId());
if(key != null)
threshold.getUnitCvRef().setPrimaryKey(key);
}
}
}
// check all AttachmentParameters in this QualityAssessment