001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.List;
021    
022    /**
023     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.OrganizationServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portal.service.http.OrganizationServiceSoap
027     * @generated
028     */
029    public class OrganizationSoap implements Serializable {
030            public static OrganizationSoap toSoapModel(Organization model) {
031                    OrganizationSoap soapModel = new OrganizationSoap();
032    
033                    soapModel.setOrganizationId(model.getOrganizationId());
034                    soapModel.setCompanyId(model.getCompanyId());
035                    soapModel.setParentOrganizationId(model.getParentOrganizationId());
036                    soapModel.setLeftOrganizationId(model.getLeftOrganizationId());
037                    soapModel.setRightOrganizationId(model.getRightOrganizationId());
038                    soapModel.setName(model.getName());
039                    soapModel.setType(model.getType());
040                    soapModel.setRecursable(model.getRecursable());
041                    soapModel.setRegionId(model.getRegionId());
042                    soapModel.setCountryId(model.getCountryId());
043                    soapModel.setStatusId(model.getStatusId());
044                    soapModel.setComments(model.getComments());
045    
046                    return soapModel;
047            }
048    
049            public static OrganizationSoap[] toSoapModels(Organization[] models) {
050                    OrganizationSoap[] soapModels = new OrganizationSoap[models.length];
051    
052                    for (int i = 0; i < models.length; i++) {
053                            soapModels[i] = toSoapModel(models[i]);
054                    }
055    
056                    return soapModels;
057            }
058    
059            public static OrganizationSoap[][] toSoapModels(Organization[][] models) {
060                    OrganizationSoap[][] soapModels = null;
061    
062                    if (models.length > 0) {
063                            soapModels = new OrganizationSoap[models.length][models[0].length];
064                    }
065                    else {
066                            soapModels = new OrganizationSoap[0][0];
067                    }
068    
069                    for (int i = 0; i < models.length; i++) {
070                            soapModels[i] = toSoapModels(models[i]);
071                    }
072    
073                    return soapModels;
074            }
075    
076            public static OrganizationSoap[] toSoapModels(List<Organization> models) {
077                    List<OrganizationSoap> soapModels = new ArrayList<OrganizationSoap>(models.size());
078    
079                    for (Organization model : models) {
080                            soapModels.add(toSoapModel(model));
081                    }
082    
083                    return soapModels.toArray(new OrganizationSoap[soapModels.size()]);
084            }
085    
086            public OrganizationSoap() {
087            }
088    
089            public long getPrimaryKey() {
090                    return _organizationId;
091            }
092    
093            public void setPrimaryKey(long pk) {
094                    setOrganizationId(pk);
095            }
096    
097            public long getOrganizationId() {
098                    return _organizationId;
099            }
100    
101            public void setOrganizationId(long organizationId) {
102                    _organizationId = organizationId;
103            }
104    
105            public long getCompanyId() {
106                    return _companyId;
107            }
108    
109            public void setCompanyId(long companyId) {
110                    _companyId = companyId;
111            }
112    
113            public long getParentOrganizationId() {
114                    return _parentOrganizationId;
115            }
116    
117            public void setParentOrganizationId(long parentOrganizationId) {
118                    _parentOrganizationId = parentOrganizationId;
119            }
120    
121            public long getLeftOrganizationId() {
122                    return _leftOrganizationId;
123            }
124    
125            public void setLeftOrganizationId(long leftOrganizationId) {
126                    _leftOrganizationId = leftOrganizationId;
127            }
128    
129            public long getRightOrganizationId() {
130                    return _rightOrganizationId;
131            }
132    
133            public void setRightOrganizationId(long rightOrganizationId) {
134                    _rightOrganizationId = rightOrganizationId;
135            }
136    
137            public String getName() {
138                    return _name;
139            }
140    
141            public void setName(String name) {
142                    _name = name;
143            }
144    
145            public String getType() {
146                    return _type;
147            }
148    
149            public void setType(String type) {
150                    _type = type;
151            }
152    
153            public boolean getRecursable() {
154                    return _recursable;
155            }
156    
157            public boolean isRecursable() {
158                    return _recursable;
159            }
160    
161            public void setRecursable(boolean recursable) {
162                    _recursable = recursable;
163            }
164    
165            public long getRegionId() {
166                    return _regionId;
167            }
168    
169            public void setRegionId(long regionId) {
170                    _regionId = regionId;
171            }
172    
173            public long getCountryId() {
174                    return _countryId;
175            }
176    
177            public void setCountryId(long countryId) {
178                    _countryId = countryId;
179            }
180    
181            public int getStatusId() {
182                    return _statusId;
183            }
184    
185            public void setStatusId(int statusId) {
186                    _statusId = statusId;
187            }
188    
189            public String getComments() {
190                    return _comments;
191            }
192    
193            public void setComments(String comments) {
194                    _comments = comments;
195            }
196    
197            private long _organizationId;
198            private long _companyId;
199            private long _parentOrganizationId;
200            private long _leftOrganizationId;
201            private long _rightOrganizationId;
202            private String _name;
203            private String _type;
204            private boolean _recursable;
205            private long _regionId;
206            private long _countryId;
207            private int _statusId;
208            private String _comments;
209    }