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