001    /**
002     * Copyright (c) 2000-2013 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.setTreePath(model.getTreePath());
037                    soapModel.setName(model.getName());
038                    soapModel.setType(model.getType());
039                    soapModel.setRecursable(model.getRecursable());
040                    soapModel.setRegionId(model.getRegionId());
041                    soapModel.setCountryId(model.getCountryId());
042                    soapModel.setStatusId(model.getStatusId());
043                    soapModel.setComments(model.getComments());
044    
045                    return soapModel;
046            }
047    
048            public static OrganizationSoap[] toSoapModels(Organization[] models) {
049                    OrganizationSoap[] soapModels = new OrganizationSoap[models.length];
050    
051                    for (int i = 0; i < models.length; i++) {
052                            soapModels[i] = toSoapModel(models[i]);
053                    }
054    
055                    return soapModels;
056            }
057    
058            public static OrganizationSoap[][] toSoapModels(Organization[][] models) {
059                    OrganizationSoap[][] soapModels = null;
060    
061                    if (models.length > 0) {
062                            soapModels = new OrganizationSoap[models.length][models[0].length];
063                    }
064                    else {
065                            soapModels = new OrganizationSoap[0][0];
066                    }
067    
068                    for (int i = 0; i < models.length; i++) {
069                            soapModels[i] = toSoapModels(models[i]);
070                    }
071    
072                    return soapModels;
073            }
074    
075            public static OrganizationSoap[] toSoapModels(List<Organization> models) {
076                    List<OrganizationSoap> soapModels = new ArrayList<OrganizationSoap>(models.size());
077    
078                    for (Organization model : models) {
079                            soapModels.add(toSoapModel(model));
080                    }
081    
082                    return soapModels.toArray(new OrganizationSoap[soapModels.size()]);
083            }
084    
085            public OrganizationSoap() {
086            }
087    
088            public long getPrimaryKey() {
089                    return _organizationId;
090            }
091    
092            public void setPrimaryKey(long pk) {
093                    setOrganizationId(pk);
094            }
095    
096            public long getOrganizationId() {
097                    return _organizationId;
098            }
099    
100            public void setOrganizationId(long organizationId) {
101                    _organizationId = organizationId;
102            }
103    
104            public long getCompanyId() {
105                    return _companyId;
106            }
107    
108            public void setCompanyId(long companyId) {
109                    _companyId = companyId;
110            }
111    
112            public long getParentOrganizationId() {
113                    return _parentOrganizationId;
114            }
115    
116            public void setParentOrganizationId(long parentOrganizationId) {
117                    _parentOrganizationId = parentOrganizationId;
118            }
119    
120            public String getTreePath() {
121                    return _treePath;
122            }
123    
124            public void setTreePath(String treePath) {
125                    _treePath = treePath;
126            }
127    
128            public String getName() {
129                    return _name;
130            }
131    
132            public void setName(String name) {
133                    _name = name;
134            }
135    
136            public String getType() {
137                    return _type;
138            }
139    
140            public void setType(String type) {
141                    _type = type;
142            }
143    
144            public boolean getRecursable() {
145                    return _recursable;
146            }
147    
148            public boolean isRecursable() {
149                    return _recursable;
150            }
151    
152            public void setRecursable(boolean recursable) {
153                    _recursable = recursable;
154            }
155    
156            public long getRegionId() {
157                    return _regionId;
158            }
159    
160            public void setRegionId(long regionId) {
161                    _regionId = regionId;
162            }
163    
164            public long getCountryId() {
165                    return _countryId;
166            }
167    
168            public void setCountryId(long countryId) {
169                    _countryId = countryId;
170            }
171    
172            public int getStatusId() {
173                    return _statusId;
174            }
175    
176            public void setStatusId(int statusId) {
177                    _statusId = statusId;
178            }
179    
180            public String getComments() {
181                    return _comments;
182            }
183    
184            public void setComments(String comments) {
185                    _comments = comments;
186            }
187    
188            private long _organizationId;
189            private long _companyId;
190            private long _parentOrganizationId;
191            private String _treePath;
192            private String _name;
193            private String _type;
194            private boolean _recursable;
195            private long _regionId;
196            private long _countryId;
197            private int _statusId;
198            private String _comments;
199    }