1
2
3
4
5
6
7
8
9 package org.jomc.model;
10
11 import java.util.ArrayList;
12 import java.util.Iterator;
13 import java.util.List;
14 import javax.annotation.Generated;
15 import javax.xml.bind.annotation.XmlAccessType;
16 import javax.xml.bind.annotation.XmlAccessorType;
17 import javax.xml.bind.annotation.XmlElement;
18 import javax.xml.bind.annotation.XmlType;
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 @XmlAccessorType(XmlAccessType.FIELD)
43 @XmlType(name = "Persons", namespace = "http://jomc.org/model", propOrder = {
44 "person"
45 })
46 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
47 public class Persons
48 extends ModelObject
49 implements Cloneable
50 {
51
52 @XmlElement(namespace = "http://jomc.org/model")
53 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
54 protected List<Person> person;
55
56
57
58
59
60 public Persons() {
61
62 super();
63 }
64
65
66
67
68
69
70
71
72
73
74 public Persons(final Persons o) {
75
76 super(o);
77 if (o == null) {
78 throw new NullPointerException("Cannot create a copy of 'Persons' from 'null'.");
79 }
80
81 if (o.person!= null) {
82 copyPerson(o.getPerson(), this.getPerson());
83 }
84 }
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
109 public List<Person> getPerson() {
110 if (person == null) {
111 person = new ArrayList<Person>();
112 }
113 return this.person;
114 }
115
116
117
118
119
120
121
122
123
124
125
126 @SuppressWarnings("unchecked")
127 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
128 private static void copyPerson(final List<Person> source, final List<Person> target) {
129
130 if ((source!= null)&&(!source.isEmpty())) {
131 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
132 final Object next = it.next();
133 if (next instanceof Person) {
134
135 target.add(((Person) next).clone());
136 continue;
137 }
138
139 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Person' of class 'org.jomc.model.Persons'."));
140 }
141 }
142 }
143
144
145
146
147
148
149
150
151 @Override
152 @Generated(value = "com.sun.tools.xjc.Driver", date = "2013-04-21T08:43:16+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
153 public Persons clone() {
154 {
155
156 final Persons clone = ((Persons) super.clone());
157
158 if (this.person!= null) {
159 clone.person = null;
160 copyPerson(this.getPerson(), clone.getPerson());
161 }
162 return clone;
163 }
164 }
165
166 }