vhLib.Class,vhLib.Macro TECH.ObjectUtils.WaardenKopieerder,TECH.RegisteredObject %String list 1 %String list 1 NietTeKopierenProperties:%ListOfDataTypes="" 1 1 %Status 1 %ListOfDataTypes Object1:%RegisteredObject,Object2:%RegisteredObject,flagOverwrite:%Boolean=0 "_Object2.%ClassName(1)) do ##class(TECH.ExceptionHandler).Throw(Exception) } #dim arrProperties As %String = "" do arrProperties^vhLib.Class(Object1.%ClassName(1),.arrProperties,"A","A","A") set itProperties = ##class(TECH.ArrayOneDimIterator).%New(.arrProperties) while itProperties.HasNext() { #dim PropertyInfo As %List = itProperties.Next() #dim PropertyName As %String = itProperties.Key() #dim PropertyValue As %String = ..GeefPropertyWaarde(Object1,PropertyName) #dim PropertyValueDefaults As %String = ..GeefPropertyWaarde(Object2,PropertyName) #dim PropertyCollection As %String = $listget(PropertyInfo,$$$fldCollection) if ##class(TECH.ClassUtils).IsDataType($listget(PropertyInfo,$$$fldClassName)) { if $length(PropertyCollection) { if PropertyValue.Count() = 0 || ( flagOverwrite ){ if PropertyCollection = "list" set PropertyValue = ##class(TECH.ListUtils).CopyListOfDataTypes(PropertyValueDefaults) if PropertyCollection = "array" set PropertyValue = ##class(TECH.ListUtils).CopyArrayOfDataTypes(PropertyValueDefaults) } } elseif ( PropertyValue = "" ) || ( flagOverwrite ) { set PropertyValue = PropertyValueDefaults } If $$$Not(##class(TECH.ListUtils).Contains(..NietTeKopierenProperties,PropertyName)) { Do ..ZetPropertyWaarde(Object1,PropertyName,PropertyValue) Do ..ZetGewijzigdeProperty(PropertyName) } } } ]]> Object:%Library.Base,Property:%String 1 0 %CacheString Object:%Library.Base,Property:%String,Value:%CacheString 1 0 PropertyName:%String 1