1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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="OrganizationSoap.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.OrganizationServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.OrganizationServiceSoap
37   * @generated
38   */
39  public class OrganizationSoap implements Serializable {
40      public static OrganizationSoap toSoapModel(Organization model) {
41          OrganizationSoap soapModel = new OrganizationSoap();
42  
43          soapModel.setOrganizationId(model.getOrganizationId());
44          soapModel.setCompanyId(model.getCompanyId());
45          soapModel.setParentOrganizationId(model.getParentOrganizationId());
46          soapModel.setLeftOrganizationId(model.getLeftOrganizationId());
47          soapModel.setRightOrganizationId(model.getRightOrganizationId());
48          soapModel.setName(model.getName());
49          soapModel.setType(model.getType());
50          soapModel.setRecursable(model.getRecursable());
51          soapModel.setRegionId(model.getRegionId());
52          soapModel.setCountryId(model.getCountryId());
53          soapModel.setStatusId(model.getStatusId());
54          soapModel.setComments(model.getComments());
55  
56          return soapModel;
57      }
58  
59      public static OrganizationSoap[] toSoapModels(Organization[] models) {
60          OrganizationSoap[] soapModels = new OrganizationSoap[models.length];
61  
62          for (int i = 0; i < models.length; i++) {
63              soapModels[i] = toSoapModel(models[i]);
64          }
65  
66          return soapModels;
67      }
68  
69      public static OrganizationSoap[][] toSoapModels(Organization[][] models) {
70          OrganizationSoap[][] soapModels = null;
71  
72          if (models.length > 0) {
73              soapModels = new OrganizationSoap[models.length][models[0].length];
74          }
75          else {
76              soapModels = new OrganizationSoap[0][0];
77          }
78  
79          for (int i = 0; i < models.length; i++) {
80              soapModels[i] = toSoapModels(models[i]);
81          }
82  
83          return soapModels;
84      }
85  
86      public static OrganizationSoap[] toSoapModels(List<Organization> models) {
87          List<OrganizationSoap> soapModels = new ArrayList<OrganizationSoap>(models.size());
88  
89          for (Organization model : models) {
90              soapModels.add(toSoapModel(model));
91          }
92  
93          return soapModels.toArray(new OrganizationSoap[soapModels.size()]);
94      }
95  
96      public OrganizationSoap() {
97      }
98  
99      public long getPrimaryKey() {
100         return _organizationId;
101     }
102 
103     public void setPrimaryKey(long pk) {
104         setOrganizationId(pk);
105     }
106 
107     public long getOrganizationId() {
108         return _organizationId;
109     }
110 
111     public void setOrganizationId(long organizationId) {
112         _organizationId = organizationId;
113     }
114 
115     public long getCompanyId() {
116         return _companyId;
117     }
118 
119     public void setCompanyId(long companyId) {
120         _companyId = companyId;
121     }
122 
123     public long getParentOrganizationId() {
124         return _parentOrganizationId;
125     }
126 
127     public void setParentOrganizationId(long parentOrganizationId) {
128         _parentOrganizationId = parentOrganizationId;
129     }
130 
131     public long getLeftOrganizationId() {
132         return _leftOrganizationId;
133     }
134 
135     public void setLeftOrganizationId(long leftOrganizationId) {
136         _leftOrganizationId = leftOrganizationId;
137     }
138 
139     public long getRightOrganizationId() {
140         return _rightOrganizationId;
141     }
142 
143     public void setRightOrganizationId(long rightOrganizationId) {
144         _rightOrganizationId = rightOrganizationId;
145     }
146 
147     public String getName() {
148         return _name;
149     }
150 
151     public void setName(String name) {
152         _name = name;
153     }
154 
155     public String getType() {
156         return _type;
157     }
158 
159     public void setType(String type) {
160         _type = type;
161     }
162 
163     public boolean getRecursable() {
164         return _recursable;
165     }
166 
167     public boolean isRecursable() {
168         return _recursable;
169     }
170 
171     public void setRecursable(boolean recursable) {
172         _recursable = recursable;
173     }
174 
175     public long getRegionId() {
176         return _regionId;
177     }
178 
179     public void setRegionId(long regionId) {
180         _regionId = regionId;
181     }
182 
183     public long getCountryId() {
184         return _countryId;
185     }
186 
187     public void setCountryId(long countryId) {
188         _countryId = countryId;
189     }
190 
191     public int getStatusId() {
192         return _statusId;
193     }
194 
195     public void setStatusId(int statusId) {
196         _statusId = statusId;
197     }
198 
199     public String getComments() {
200         return _comments;
201     }
202 
203     public void setComments(String comments) {
204         _comments = comments;
205     }
206 
207     private long _organizationId;
208     private long _companyId;
209     private long _parentOrganizationId;
210     private long _leftOrganizationId;
211     private long _rightOrganizationId;
212     private String _name;
213     private String _type;
214     private boolean _recursable;
215     private long _regionId;
216     private long _countryId;
217     private int _statusId;
218     private String _comments;
219 }