public Object copyTo(ObjectLocator locator, Object target, CopyStrategy strategy) { final Object draftCopy = ((target == null) ? createNewInstance() : target); if (draftCopy instanceof ZustandAngaben) { final ZustandAngaben copy = ((ZustandAngaben) draftCopy); if (this.baujahr != null) { String sourceBaujahr; sourceBaujahr = this.getBaujahr(); String copyBaujahr = ((String) strategy.copy( LocatorUtils.property(locator, "baujahr", sourceBaujahr), sourceBaujahr)); copy.setBaujahr(copyBaujahr); } else { copy.baujahr = null; } if (this.zustand != null) { Zustand sourceZustand; sourceZustand = this.getZustand(); Zustand copyZustand = ((Zustand) strategy.copy( LocatorUtils.property(locator, "zustand", sourceZustand), sourceZustand)); copy.setZustand(copyZustand); } else { copy.zustand = null; } if (this.alter != null) { Alter sourceAlter; sourceAlter = this.getAlter(); Alter copyAlter = ((Alter) strategy.copy(LocatorUtils.property(locator, "alter", sourceAlter), sourceAlter)); copy.setAlter(copyAlter); } else { copy.alter = null; } if (this.bebaubarNach != null) { BebaubarNach sourceBebaubarNach; sourceBebaubarNach = this.getBebaubarNach(); BebaubarNach copyBebaubarNach = ((BebaubarNach) strategy.copy( LocatorUtils.property(locator, "bebaubarNach", sourceBebaubarNach), sourceBebaubarNach)); copy.setBebaubarNach(copyBebaubarNach); } else { copy.bebaubarNach = null; } if (this.erschliessung != null) { Erschliessung sourceErschliessung; sourceErschliessung = this.getErschliessung(); Erschliessung copyErschliessung = ((Erschliessung) strategy.copy( LocatorUtils.property(locator, "erschliessung", sourceErschliessung), sourceErschliessung)); copy.setErschliessung(copyErschliessung); } else { copy.erschliessung = null; } if (this.altlasten != null) { String sourceAltlasten; sourceAltlasten = this.getAltlasten(); String copyAltlasten = ((String) strategy.copy( LocatorUtils.property(locator, "altlasten", sourceAltlasten), sourceAltlasten)); copy.setAltlasten(copyAltlasten); } else { copy.altlasten = null; } if ((this.userDefinedSimplefield != null) && (!this.userDefinedSimplefield.isEmpty())) { List<UserDefinedSimplefield> sourceUserDefinedSimplefield; sourceUserDefinedSimplefield = (((this.userDefinedSimplefield != null) && (!this.userDefinedSimplefield.isEmpty())) ? this.getUserDefinedSimplefield() : null); @SuppressWarnings("unchecked") List<UserDefinedSimplefield> copyUserDefinedSimplefield = ((List<UserDefinedSimplefield>) strategy.copy( LocatorUtils.property( locator, "userDefinedSimplefield", sourceUserDefinedSimplefield), sourceUserDefinedSimplefield)); copy.userDefinedSimplefield = null; if (copyUserDefinedSimplefield != null) { List<UserDefinedSimplefield> uniqueUserDefinedSimplefieldl = copy.getUserDefinedSimplefield(); uniqueUserDefinedSimplefieldl.addAll(copyUserDefinedSimplefield); } } else { copy.userDefinedSimplefield = null; } if ((this.userDefinedAnyfield != null) && (!this.userDefinedAnyfield.isEmpty())) { List<UserDefinedAnyfield> sourceUserDefinedAnyfield; sourceUserDefinedAnyfield = (((this.userDefinedAnyfield != null) && (!this.userDefinedAnyfield.isEmpty())) ? this.getUserDefinedAnyfield() : null); @SuppressWarnings("unchecked") List<UserDefinedAnyfield> copyUserDefinedAnyfield = ((List<UserDefinedAnyfield>) strategy.copy( LocatorUtils.property( locator, "userDefinedAnyfield", sourceUserDefinedAnyfield), sourceUserDefinedAnyfield)); copy.userDefinedAnyfield = null; if (copyUserDefinedAnyfield != null) { List<UserDefinedAnyfield> uniqueUserDefinedAnyfieldl = copy.getUserDefinedAnyfield(); uniqueUserDefinedAnyfieldl.addAll(copyUserDefinedAnyfield); } } else { copy.userDefinedAnyfield = null; } } return draftCopy; }