package eu.dnetlib.uoamonitorservice.generics; import eu.dnetlib.uoamonitorservice.primitives.IndicatorType; import java.util.ArrayList; import java.util.List; public class SectionGeneric extends Common { protected String title; protected String stakeholderAlias; protected IndicatorType type; protected List indicators; public SectionGeneric() { } public SectionGeneric(SectionGeneric section) { id = section.getId(); title = section.getTitle(); defaultId = section.getDefaultId(); stakeholderAlias = section.getStakeholderAlias(); setType(section.getType()); creationDate = section.getCreationDate(); updateDate = section.getUpdateDate(); } public void copyFromDefault(SectionGeneric defaultSection) { setTitle(defaultSection.getTitle()); setType(defaultSection.getType()); setDefaultId(defaultSection.id); setCreationDate(defaultSection.getCreationDate()); setUpdateDate(defaultSection.getUpdateDate()); setIndicators(new ArrayList<>()); } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getStakeholderAlias() { return stakeholderAlias; } public void setStakeholderAlias(String stakeholderAlias) { this.stakeholderAlias = stakeholderAlias; } public String getType() { if (type == null) { return null; } return type.name(); } public void setType(String type) { if (type == null) { this.type = null; } else { this.type = IndicatorType.valueOf(type); } } public List getIndicators() { return indicators; } public void setIndicators(List indicators) { this.indicators = indicators; } }