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; }
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; }