1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="OrganizationSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * <code>com.liferay.portal.service.http.OrganizationServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.portal.service.http.OrganizationServiceSoap
46   *
47   */
48  public class OrganizationSoap implements Serializable {
49      public static OrganizationSoap toSoapModel(Organization model) {
50          OrganizationSoap soapModel = new OrganizationSoap();
51  
52          soapModel.setOrganizationId(model.getOrganizationId());
53          soapModel.setCompanyId(model.getCompanyId());
54          soapModel.setParentOrganizationId(model.getParentOrganizationId());
55          soapModel.setLeftOrganizationId(model.getLeftOrganizationId());
56          soapModel.setRightOrganizationId(model.getRightOrganizationId());
57          soapModel.setName(model.getName());
58          soapModel.setLocation(model.getLocation());
59          soapModel.setRecursable(model.getRecursable());
60          soapModel.setRegionId(model.getRegionId());
61          soapModel.setCountryId(model.getCountryId());
62          soapModel.setStatusId(model.getStatusId());
63          soapModel.setComments(model.getComments());
64  
65          return soapModel;
66      }
67  
68      public static OrganizationSoap[] toSoapModels(Organization[] models) {
69          OrganizationSoap[] soapModels = new OrganizationSoap[models.length];
70  
71          for (int i = 0; i < models.length; i++) {
72              soapModels[i] = toSoapModel(models[i]);
73          }
74  
75          return soapModels;
76      }
77  
78      public static OrganizationSoap[][] toSoapModels(Organization[][] models) {
79          OrganizationSoap[][] soapModels = null;
80  
81          if (models.length > 0) {
82              soapModels = new OrganizationSoap[models.length][models[0].length];
83          }
84          else {
85              soapModels = new OrganizationSoap[0][0];
86          }
87  
88          for (int i = 0; i < models.length; i++) {
89              soapModels[i] = toSoapModels(models[i]);
90          }
91  
92          return soapModels;
93      }
94  
95      public static OrganizationSoap[] toSoapModels(List<Organization> models) {
96          List<OrganizationSoap> soapModels = new ArrayList<OrganizationSoap>(models.size());
97  
98          for (Organization model : models) {
99              soapModels.add(toSoapModel(model));
100         }
101 
102         return soapModels.toArray(new OrganizationSoap[soapModels.size()]);
103     }
104 
105     public OrganizationSoap() {
106     }
107 
108     public long getPrimaryKey() {
109         return _organizationId;
110     }
111 
112     public void setPrimaryKey(long pk) {
113         setOrganizationId(pk);
114     }
115 
116     public long getOrganizationId() {
117         return _organizationId;
118     }
119 
120     public void setOrganizationId(long organizationId) {
121         _organizationId = organizationId;
122     }
123 
124     public long getCompanyId() {
125         return _companyId;
126     }
127 
128     public void setCompanyId(long companyId) {
129         _companyId = companyId;
130     }
131 
132     public long getParentOrganizationId() {
133         return _parentOrganizationId;
134     }
135 
136     public void setParentOrganizationId(long parentOrganizationId) {
137         _parentOrganizationId = parentOrganizationId;
138     }
139 
140     public long getLeftOrganizationId() {
141         return _leftOrganizationId;
142     }
143 
144     public void setLeftOrganizationId(long leftOrganizationId) {
145         _leftOrganizationId = leftOrganizationId;
146     }
147 
148     public long getRightOrganizationId() {
149         return _rightOrganizationId;
150     }
151 
152     public void setRightOrganizationId(long rightOrganizationId) {
153         _rightOrganizationId = rightOrganizationId;
154     }
155 
156     public String getName() {
157         return _name;
158     }
159 
160     public void setName(String name) {
161         _name = name;
162     }
163 
164     public boolean getLocation() {
165         return _location;
166     }
167 
168     public boolean isLocation() {
169         return _location;
170     }
171 
172     public void setLocation(boolean location) {
173         _location = location;
174     }
175 
176     public boolean getRecursable() {
177         return _recursable;
178     }
179 
180     public boolean isRecursable() {
181         return _recursable;
182     }
183 
184     public void setRecursable(boolean recursable) {
185         _recursable = recursable;
186     }
187 
188     public long getRegionId() {
189         return _regionId;
190     }
191 
192     public void setRegionId(long regionId) {
193         _regionId = regionId;
194     }
195 
196     public long getCountryId() {
197         return _countryId;
198     }
199 
200     public void setCountryId(long countryId) {
201         _countryId = countryId;
202     }
203 
204     public int getStatusId() {
205         return _statusId;
206     }
207 
208     public void setStatusId(int statusId) {
209         _statusId = statusId;
210     }
211 
212     public String getComments() {
213         return _comments;
214     }
215 
216     public void setComments(String comments) {
217         _comments = comments;
218     }
219 
220     private long _organizationId;
221     private long _companyId;
222     private long _parentOrganizationId;
223     private long _leftOrganizationId;
224     private long _rightOrganizationId;
225     private String _name;
226     private boolean _location;
227     private boolean _recursable;
228     private long _regionId;
229     private long _countryId;
230     private int _statusId;
231     private String _comments;
232 }