public virtual ProjectTemplateTable deepCopyRateBuildUpsOnly() { ProjectTemplateTable p = (ProjectTemplateTable)clone(); p.VariableSet = new HashSet <ProjectVariableTable>(); p.RateBuildUpSet = new HashSet <RateBuildUpTable>(); p.RateBuildUpColumnsSet = new HashSet <RateBuildUpColumnsTable>(); p.RateDistributorSet = new HashSet <RateDistributorTable>(); if (RateBuildUpColumnsSet == null) { RateBuildUpColumnsSet = Collections.EMPTY_SET; } if (RateBuildUpSet == null) { RateBuildUpSet = Collections.EMPTY_SET; } foreach (RateBuildUpTable var in RateBuildUpSet) { p.RateBuildUpSet.Add((RateBuildUpTable)var.clone()); } foreach (RateBuildUpColumnsTable var in RateBuildUpColumnsSet) { p.RateBuildUpColumnsSet.Add((RateBuildUpColumnsTable)var.clone()); } return(p); }
public virtual object clone() { ProjectTemplateTable o = new ProjectTemplateTable(); o.Data = this; o.Id = Id; o.ProjectId = ProjectId; return(o); }
public virtual ProjectTemplateTable deepCopy() { ProjectTemplateTable p = (ProjectTemplateTable)clone(); p.VariableSet = new HashSet <ProjectVariableTable>(); p.RateBuildUpSet = new HashSet <RateBuildUpTable>(); p.RateBuildUpColumnsSet = new HashSet <RateBuildUpColumnsTable>(); p.RateDistributorSet = new HashSet <RateDistributorTable>(); p.Selected = Selected; p.TemplateUsersAndRoles = TemplateUsersAndRoles; if (VariableSet == null) { VariableSet = Collections.EMPTY_SET; } if (RateBuildUpColumnsSet == null) { RateBuildUpColumnsSet = Collections.EMPTY_SET; } if (RateBuildUpSet == null) { RateBuildUpSet = Collections.EMPTY_SET; } if (RateDistributorSet == null) { RateDistributorSet = Collections.EMPTY_SET; } foreach (ProjectVariableTable var in VariableSet) { p.VariableSet.Add((ProjectVariableTable)var.clone()); } foreach (RateBuildUpTable var in RateBuildUpSet) { p.RateBuildUpSet.Add((RateBuildUpTable)var.clone()); } foreach (RateBuildUpColumnsTable var in RateBuildUpColumnsSet) { p.RateBuildUpColumnsSet.Add((RateBuildUpColumnsTable)var.clone()); } foreach (RateDistributorTable var in RateDistributorSet) { p.RateDistributorSet.Add((RateDistributorTable)var.clone()); } if (ExcelFile != null) { p.ExcelFile = (ProjectExcelFile)ExcelFile.clone(); } return(p); }
public virtual ProjectTemplateTable deepCopyVariablesOnly() { ProjectTemplateTable p = (ProjectTemplateTable)clone(); p.VariableSet = new HashSet <ProjectVariableTable>(); if (VariableSet == null) { VariableSet = Collections.EMPTY_SET; } foreach (ProjectVariableTable var in VariableSet) { p.VariableSet.Add((ProjectVariableTable)var.clone()); } return(p); }