@Transient public Map<Integer, NavigationDefaults> getChartDefaults() { if (chartDefaults == null) { chartDefaults = new HashMap<Integer, NavigationDefaults>(); for (NavigationSettings setting : getNavigationSettings()) { chartDefaults.put(setting.getChartId(), setting.getSettingsData()); } } return chartDefaults; }
public void addNavigationSettings(int chartId, NavigationDefaults updateddefaults) { if (getChartDefaults().containsKey(chartId)) { for (NavigationSettings setting : getNavigationSettings()) { if (setting.getChartId() == chartId) { setting.setSettingsData(updateddefaults); } } } else { getNavigationSettings().add(new NavigationSettings(chartId, updateddefaults, this, null)); } }