@SuppressWarnings("unchecked") public Technology clone() { Technology tech = new Technology(); tech.setId(getId()); tech.setName(getName()); tech.setAppTypeId(getAppTypeId()); if (databases != null && !databases.isEmpty()) { tech.setDatabases((List<Database>) ((ArrayList<Database>) databases).clone()); } if (frameworks != null && !frameworks.isEmpty()) { tech.setFrameworks((List<ModuleGroup>) ((ArrayList<ModuleGroup>) frameworks).clone()); } if (jsLibraries != null && !jsLibraries.isEmpty()) { tech.setJsLibraries((List<ModuleGroup>) ((ArrayList<ModuleGroup>) jsLibraries).clone()); } if (modules != null && !modules.isEmpty()) { tech.setModules((List<ModuleGroup>) ((ArrayList<ModuleGroup>) modules).clone()); } if (servers != null && !servers.isEmpty()) { tech.setServers((List<Server>) ((ArrayList<Server>) servers).clone()); } if (webservices != null && !webservices.isEmpty()) { tech.setWebservices((List<WebService>) ((ArrayList<WebService>) this.webservices).clone()); } return tech; }
private void fillMapTechnologies() throws PhrescoException { List<ApplicationType> applicationTypes = getApplicationTypes(); for (ApplicationType applicationType : applicationTypes) { List<Technology> appTechnologies = applicationType.getTechnologies(); for (Technology technology : appTechnologies) { technologies.put(technology.getId(), technology); } } }