public RelatedPerson copy() { RelatedPerson dst = new RelatedPerson(); dst.identifier = new ArrayList<Identifier>(); for (Identifier i : identifier) dst.identifier.add(i.copy()); dst.patient = patient == null ? null : patient.copy(); dst.relationship = relationship == null ? null : relationship.copy(); dst.name = name == null ? null : name.copy(); dst.telecom = new ArrayList<Contact>(); for (Contact i : telecom) dst.telecom.add(i.copy()); dst.gender = gender == null ? null : gender.copy(); dst.address = address == null ? null : address.copy(); dst.photo = new ArrayList<Attachment>(); for (Attachment i : photo) dst.photo.add(i.copy()); return dst; }
public Device copy() { Device dst = new Device(); dst.type = type == null ? null : type.copy(); dst.manufacturer = manufacturer == null ? null : manufacturer.copy(); dst.model = model == null ? null : model.copy(); dst.version = version == null ? null : version.copy(); dst.expiry = expiry == null ? null : expiry.copy(); dst.identity = identity == null ? null : identity.copy(dst); dst.owner = owner == null ? null : owner.copy(); dst.assignedId = new ArrayList<Identifier>(); for (Identifier i : assignedId) dst.assignedId.add(i.copy()); dst.location = location == null ? null : location.copy(); dst.patient = patient == null ? null : patient.copy(); dst.contact = new ArrayList<Contact>(); for (Contact i : contact) dst.contact.add(i.copy()); dst.url = url == null ? null : url.copy(); return dst; }