Bug 1029: Remove dead code: samples/clustersession
[controller.git] / opendaylight / northbound / bundlescanner / implementation / src / test / java / bundle_sub2 / Customer.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package bundle_sub2;
9
10 import java.util.ArrayList;
11 import java.util.List;
12
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlElementRef;
15 import javax.xml.bind.annotation.XmlElementWrapper;
16 import javax.xml.bind.annotation.XmlRootElement;
17 import javax.xml.bind.annotation.XmlTransient;
18
19 import bundle_base.BasePerson;
20 import bundle_base.Person;
21
22
23 @XmlRootElement
24 public class Customer extends Person {
25
26     private String password;
27     private List<String> phoneNumbers;
28     @XmlElementRef
29     @XmlElementWrapper
30     private final List<BasePerson> agents = new ArrayList<BasePerson>();
31
32     @XmlTransient
33     public String getPassword() {
34         return password;
35     }
36
37     public void setPassword(String password) {
38         this.password = password;
39     }
40
41     @XmlElement(name = "phone-number")
42     public List<String> getPhoneNumbers() {
43         return phoneNumbers;
44     }
45
46     public void setPhoneNumbers(List<String> phoneNumbers) {
47         this.phoneNumbers = phoneNumbers;
48     }
49
50     public void addAgent(Person mgr) {
51         this.agents.add(mgr);
52     }
53
54     @Override
55     public String toString() {
56         StringBuilder sb = new StringBuilder(super.toString());
57         sb.append(" password:").append(password);
58         sb.append(" phoneNumbers:").append(phoneNumbers);
59         sb.append(" agents:").append(agents);
60         return sb.toString();
61     }
62 }
63