1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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   * {@link com.liferay.portal.service.http.OrganizationServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portal.service.http.OrganizationServiceSoap
45   * @generated
46   */
47  public class OrganizationSoap implements Serializable {
48      public static OrganizationSoap toSoapModel(Organization model) {
49          OrganizationSoap soapModel = new OrganizationSoap();
50  
51          soapModel.setOrganizationId(model.getOrganizationId());
52          soapModel.setCompanyId(model.getCompanyId());
53          soapModel.setParentOrganizationId(model.getParentOrganizationId());
54          soapModel.setLeftOrganizationId(model.getLeftOrganizationId());
55          soapModel.setRightOrganizationId(model.getRightOrganizationId());
56          soapModel.setName(model.getName());
57          soapModel.setLocation(model.getLocation());
58          soapModel.setRecursable(model.getRecursable());
59          soapModel.setRegionId(model.getRegionId());
60          soapModel.setCountryId(model.getCountryId());
61          soapModel.setStatusId(model.getStatusId());
62          soapModel.setComments(model.getComments());
63  
64          return soapModel;
65      }
66  
67      public static OrganizationSoap[] toSoapModels(Organization[] models) {
68          OrganizationSoap[] soapModels = new OrganizationSoap[models.length];
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModel(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static OrganizationSoap[][] toSoapModels(Organization[][] models) {
78          OrganizationSoap[][] soapModels = null;
79  
80          if (models.length > 0) {
81              soapModels = new OrganizationSoap[models.length][models[0].length];
82          }
83          else {
84              soapModels = new OrganizationSoap[0][0];
85          }
86  
87          for (int i = 0; i < models.length; i++) {
88              soapModels[i] = toSoapModels(models[i]);
89          }
90  
91          return soapModels;
92      }
93  
94      public static OrganizationSoap[] toSoapModels(List<Organization> models) {
95          List<OrganizationSoap> soapModels = new ArrayList<OrganizationSoap>(models.size());
96  
97          for (Organization model : models) {
98              soapModels.add(toSoapModel(model));
99          }
100 
101         return soapModels.toArray(new OrganizationSoap[soapModels.size()]);
102     }
103 
104     public OrganizationSoap() {
105     }
106 
107     public long getPrimaryKey() {
108         return _organizationId;
109     }
110 
111     public void setPrimaryKey(long pk) {
112         setOrganizationId(pk);
113     }
114 
115     public long getOrganizationId() {
116         return _organizationId;
117     }
118 
119     public void setOrganizationId(long organizationId) {
120         _organizationId = organizationId;
121     }
122 
123     public long getCompanyId() {
124         return _companyId;
125     }
126 
127     public void setCompanyId(long companyId) {
128         _companyId = companyId;
129     }
130 
131     public long getParentOrganizationId() {
132         return _parentOrganizationId;
133     }
134 
135     public void setParentOrganizationId(long parentOrganizationId) {
136         _parentOrganizationId = parentOrganizationId;
137     }
138 
139     public long getLeftOrganizationId() {
140         return _leftOrganizationId;
141     }
142 
143     public void setLeftOrganizationId(long leftOrganizationId) {
144         _leftOrganizationId = leftOrganizationId;
145     }
146 
147     public long getRightOrganizationId() {
148         return _rightOrganizationId;
149     }
150 
151     public void setRightOrganizationId(long rightOrganizationId) {
152         _rightOrganizationId = rightOrganizationId;
153     }
154 
155     public String getName() {
156         return _name;
157     }
158 
159     public void setName(String name) {
160         _name = name;
161     }
162 
163     public boolean getLocation() {
164         return _location;
165     }
166 
167     public boolean isLocation() {
168         return _location;
169     }
170 
171     public void setLocation(boolean location) {
172         _location = location;
173     }
174 
175     public boolean getRecursable() {
176         return _recursable;
177     }
178 
179     public boolean isRecursable() {
180         return _recursable;
181     }
182 
183     public void setRecursable(boolean recursable) {
184         _recursable = recursable;
185     }
186 
187     public long getRegionId() {
188         return _regionId;
189     }
190 
191     public void setRegionId(long regionId) {
192         _regionId = regionId;
193     }
194 
195     public long getCountryId() {
196         return _countryId;
197     }
198 
199     public void setCountryId(long countryId) {
200         _countryId = countryId;
201     }
202 
203     public int getStatusId() {
204         return _statusId;
205     }
206 
207     public void setStatusId(int statusId) {
208         _statusId = statusId;
209     }
210 
211     public String getComments() {
212         return _comments;
213     }
214 
215     public void setComments(String comments) {
216         _comments = comments;
217     }
218 
219     private long _organizationId;
220     private long _companyId;
221     private long _parentOrganizationId;
222     private long _leftOrganizationId;
223     private long _rightOrganizationId;
224     private String _name;
225     private boolean _location;
226     private boolean _recursable;
227     private long _regionId;
228     private long _countryId;
229     private int _statusId;
230     private String _comments;
231 }