001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.RegionServiceSoap}.
026     *
027     * @author Brian Wing Shun Chan
028     * @see com.liferay.portal.service.http.RegionServiceSoap
029     * @generated
030     */
031    @ProviderType
032    public class RegionSoap implements Serializable {
033            public static RegionSoap toSoapModel(Region model) {
034                    RegionSoap soapModel = new RegionSoap();
035    
036                    soapModel.setMvccVersion(model.getMvccVersion());
037                    soapModel.setRegionId(model.getRegionId());
038                    soapModel.setCountryId(model.getCountryId());
039                    soapModel.setRegionCode(model.getRegionCode());
040                    soapModel.setName(model.getName());
041                    soapModel.setActive(model.getActive());
042    
043                    return soapModel;
044            }
045    
046            public static RegionSoap[] toSoapModels(Region[] models) {
047                    RegionSoap[] soapModels = new RegionSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static RegionSoap[][] toSoapModels(Region[][] models) {
057                    RegionSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new RegionSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new RegionSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static RegionSoap[] toSoapModels(List<Region> models) {
074                    List<RegionSoap> soapModels = new ArrayList<RegionSoap>(models.size());
075    
076                    for (Region model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new RegionSoap[soapModels.size()]);
081            }
082    
083            public RegionSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _regionId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setRegionId(pk);
092            }
093    
094            public long getMvccVersion() {
095                    return _mvccVersion;
096            }
097    
098            public void setMvccVersion(long mvccVersion) {
099                    _mvccVersion = mvccVersion;
100            }
101    
102            public long getRegionId() {
103                    return _regionId;
104            }
105    
106            public void setRegionId(long regionId) {
107                    _regionId = regionId;
108            }
109    
110            public long getCountryId() {
111                    return _countryId;
112            }
113    
114            public void setCountryId(long countryId) {
115                    _countryId = countryId;
116            }
117    
118            public String getRegionCode() {
119                    return _regionCode;
120            }
121    
122            public void setRegionCode(String regionCode) {
123                    _regionCode = regionCode;
124            }
125    
126            public String getName() {
127                    return _name;
128            }
129    
130            public void setName(String name) {
131                    _name = name;
132            }
133    
134            public boolean getActive() {
135                    return _active;
136            }
137    
138            public boolean isActive() {
139                    return _active;
140            }
141    
142            public void setActive(boolean active) {
143                    _active = active;
144            }
145    
146            private long _mvccVersion;
147            private long _regionId;
148            private long _countryId;
149            private String _regionCode;
150            private String _name;
151            private boolean _active;
152    }