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