1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="CountrySoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portal.service.http.CountryServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.CountryServiceSoap
37   * @generated
38   */
39  public class CountrySoap implements Serializable {
40      public static CountrySoap toSoapModel(Country model) {
41          CountrySoap soapModel = new CountrySoap();
42  
43          soapModel.setCountryId(model.getCountryId());
44          soapModel.setName(model.getName());
45          soapModel.setA2(model.getA2());
46          soapModel.setA3(model.getA3());
47          soapModel.setNumber(model.getNumber());
48          soapModel.setIdd(model.getIdd());
49          soapModel.setActive(model.getActive());
50  
51          return soapModel;
52      }
53  
54      public static CountrySoap[] toSoapModels(Country[] models) {
55          CountrySoap[] soapModels = new CountrySoap[models.length];
56  
57          for (int i = 0; i < models.length; i++) {
58              soapModels[i] = toSoapModel(models[i]);
59          }
60  
61          return soapModels;
62      }
63  
64      public static CountrySoap[][] toSoapModels(Country[][] models) {
65          CountrySoap[][] soapModels = null;
66  
67          if (models.length > 0) {
68              soapModels = new CountrySoap[models.length][models[0].length];
69          }
70          else {
71              soapModels = new CountrySoap[0][0];
72          }
73  
74          for (int i = 0; i < models.length; i++) {
75              soapModels[i] = toSoapModels(models[i]);
76          }
77  
78          return soapModels;
79      }
80  
81      public static CountrySoap[] toSoapModels(List<Country> models) {
82          List<CountrySoap> soapModels = new ArrayList<CountrySoap>(models.size());
83  
84          for (Country model : models) {
85              soapModels.add(toSoapModel(model));
86          }
87  
88          return soapModels.toArray(new CountrySoap[soapModels.size()]);
89      }
90  
91      public CountrySoap() {
92      }
93  
94      public long getPrimaryKey() {
95          return _countryId;
96      }
97  
98      public void setPrimaryKey(long pk) {
99          setCountryId(pk);
100     }
101 
102     public long getCountryId() {
103         return _countryId;
104     }
105 
106     public void setCountryId(long countryId) {
107         _countryId = countryId;
108     }
109 
110     public String getName() {
111         return _name;
112     }
113 
114     public void setName(String name) {
115         _name = name;
116     }
117 
118     public String getA2() {
119         return _a2;
120     }
121 
122     public void setA2(String a2) {
123         _a2 = a2;
124     }
125 
126     public String getA3() {
127         return _a3;
128     }
129 
130     public void setA3(String a3) {
131         _a3 = a3;
132     }
133 
134     public String getNumber() {
135         return _number;
136     }
137 
138     public void setNumber(String number) {
139         _number = number;
140     }
141 
142     public String getIdd() {
143         return _idd;
144     }
145 
146     public void setIdd(String idd) {
147         _idd = idd;
148     }
149 
150     public boolean getActive() {
151         return _active;
152     }
153 
154     public boolean isActive() {
155         return _active;
156     }
157 
158     public void setActive(boolean active) {
159         _active = active;
160     }
161 
162     private long _countryId;
163     private String _name;
164     private String _a2;
165     private String _a3;
166     private String _number;
167     private String _idd;
168     private boolean _active;
169 }