/** * Retrieves the confidences from a participant, initializing them if necessary. * Do not set the initialized collection of confidences because confidences cannot be orphan * @param component the component * @return The returned confidences are ensured to be initialized * @since 2.4.0 */ public static Collection<ComponentConfidence> ensureInitializedComponentConfidences(Component component) { Collection<ComponentConfidence> confidences; if (IntactCore.isInitialized(component.getConfidences())) { confidences = component.getConfidences(); } else { confidences = IntactContext.getCurrentInstance().getDaoFactory().getComponentConfidenceDao().getByComponentAc(component.getAc()); } return confidences; }
/** * Retrieves the confidences from a participant, initializing them if necessary. * Do not set the initialized collection of confidences because confidences cannot be orphan * @param component the component * @return The returned confidences are ensured to be initialized * @since 2.4.0 */ public static Collection<ComponentConfidence> ensureInitializedComponentConfidences(Component component) { Collection<ComponentConfidence> confidences; if (IntactCore.isInitialized(component.getConfidences())) { confidences = component.getConfidences(); } else { confidences = IntactContext.getCurrentInstance().getDaoFactory().getComponentConfidenceDao().getByComponentAc(component.getAc()); } return confidences; }
if (IntactCore.isInitializedAndDirty(component.getConfidences())) { Collection<ComponentConfidence> componentConfidences = synchronizeComponentConfidences(component.getConfidences(), component); component.getConfidences().clear(); component.getConfidences().addAll(componentConfidences);
if (IntactCore.isInitializedAndDirty(component.getConfidences())) { Collection<ComponentConfidence> componentConfidences = synchronizeComponentConfidences(component.getConfidences(), component); component.getConfidences().clear(); component.getConfidences().addAll(componentConfidences);
expPreparations = intactObject.getExperimentalPreparations(); features = intactObject.getFeatures(); confs = intactObject.getConfidences(); params = intactObject.getParameters();
return false; if ( !CollectionUtils.isEqualCollection(getConfidences(), component.getConfidences()) ) { return false;
return false; if ( !CollectionUtils.isEqualCollection(getConfidences(), component.getConfidences()) ) { return false;
if (isCollectionClonable(component.getConfidences())) { Collection<ComponentConfidence> confidences = IntactCore.ensureInitializedComponentConfidences(component);
if (isCollectionClonable(component.getConfidences())) { Collection<ComponentConfidence> confidences = IntactCore.ensureInitializedComponentConfidences(component);