Page History
...
Given are the two unrelated classes Person and DetailedPerson.
mapEqualNames() | ||||||
---|---|---|---|---|---|---|
anInputPerson { } | The object anInputPerson is of type DetailedPerson. | |||||
| This statement assigns values to the matching attributes of object anOutputPerson { name: "Jane", surname: "Doe", city: "Los Angeles", street: "22, Main Road", zip: 90077 } |
mapEqualNamesIfExists() | ||||||
---|---|---|---|---|---|---|
aPerson { | The object aPerson of type Person already contains values.In our example, the zip code is unknown, so the attribute zip contains the value 0. | |||||
anotherInputPerson { | The object | |||||
| This statement assigns values to the matching attributes of object aPerson { name: "John", surname: "Smith", city: "New York", street: "65, Upper Eastside", zip: 12345 } The value of street remains unchanged, because in the source object it did not exist (was NULL). |
...
Overview
Content Tools