protected ComponentParameter cloneComponentParameter(ComponentParameter componentParameter) throws IntactClonerException { if (componentParameter == null) { throw new IllegalArgumentException("You must give a non null component parameter"); } ComponentParameter clone = new ComponentParameter(); clonerManager.addClone(componentParameter, clone); clone.setBase(componentParameter.getBase()); clone.setExponent(componentParameter.getExponent()); clone.setFactor(componentParameter.getFactor()); clone.setUncertainty(componentParameter.getUncertainty()); clone.setCvParameterType(clone(componentParameter.getCvParameterType())); clone.setCvParameterUnit(clone(componentParameter.getCvParameterUnit())); clone.setComponent(componentParameter.getComponent()); return clone; }
@Override public boolean equals(Object obj) { return equals(obj, false); }
private Collection<ComponentParameter> synchronizeComponentParameters( Collection<ComponentParameter> componentParametersToSynchronize, Component parentComponent ) { List<ComponentParameter> componentParameters = new ArrayList<ComponentParameter>(componentParametersToSynchronize.size()); for ( ComponentParameter componentParameter : componentParametersToSynchronize ) { if (componentParameter.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentParameterDao().isTransient(componentParameter)) { componentParameter = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentParameterDao().getByAc(componentParameter.getAc()); } componentParameter.setCvParameterType( synchronize (componentParameter.getCvParameterType())); componentParameter.setCvParameterUnit( synchronize (componentParameter.getCvParameterUnit())); componentParameter.setComponent(parentComponent); componentParameters.add(componentParameter); } return componentParameters; }
ComponentParameter copyParameter = ( ComponentParameter ) parameter.clone(); copyParameter.setComponent( copy );
protected ComponentParameter newParameterInstance() { return new ComponentParameter(); } }
return ((Feature) child).getComponent(); } else if (child instanceof ComponentParameter) { return ((ComponentParameter) child).getComponent(); } else if (child instanceof Range) { return ((Range) child).getFeature();
private Collection<ComponentParameter> synchronizeComponentParameters( Collection<ComponentParameter> componentParametersToSynchronize, Component parentComponent ) { List<ComponentParameter> componentParameters = new ArrayList<ComponentParameter>(componentParametersToSynchronize.size()); for ( ComponentParameter componentParameter : componentParametersToSynchronize ) { if (componentParameter.getAc() != null && IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentParameterDao().isTransient(componentParameter)) { componentParameter = IntactContext.getCurrentInstance().getDataContext().getDaoFactory().getComponentParameterDao().getByAc(componentParameter.getAc()); } componentParameter.setCvParameterType( synchronize (componentParameter.getCvParameterType())); componentParameter.setCvParameterUnit( synchronize (componentParameter.getCvParameterUnit())); componentParameter.setComponent(parentComponent); componentParameters.add(componentParameter); } return componentParameters; }
ComponentParameter copyParameter = ( ComponentParameter ) parameter.clone(); copyParameter.setComponent( copy );
public ComponentParameter createComponentParameter(CvParameterType type, CvParameterUnit unit, Double factor) { ComponentParameter param = new ComponentParameter(getInstitution(), type, unit, factor); return param; }
return ((Feature) child).getComponent(); } else if (child instanceof ComponentParameter) { return ((ComponentParameter) child).getComponent(); } else if (child instanceof Range) { return ((Range) child).getFeature();
protected ComponentParameter cloneComponentParameter(ComponentParameter componentParameter) throws IntactClonerException { if (componentParameter == null) { throw new IllegalArgumentException("You must give a non null component parameter"); } ComponentParameter clone = new ComponentParameter(); clonerManager.addClone(componentParameter, clone); clone.setBase(componentParameter.getBase()); clone.setExponent(componentParameter.getExponent()); clone.setFactor(componentParameter.getFactor()); clone.setUncertainty(componentParameter.getUncertainty()); clone.setCvParameterType(clone(componentParameter.getCvParameterType())); clone.setCvParameterUnit(clone(componentParameter.getCvParameterUnit())); clone.setComponent(componentParameter.getComponent()); return clone; }
public ComponentParameter createComponentParameter(CvParameterType type, CvParameterUnit unit, Double factor) { ComponentParameter param = new ComponentParameter(getInstitution(), type, unit, factor); return param; }
@Override public boolean equals(Object obj) { return equals(obj, false); }