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.CountryServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portal.service.http.CountryServiceSoap
027     * @generated
028     */
029    public class CountrySoap implements Serializable {
030            public static CountrySoap toSoapModel(Country model) {
031                    CountrySoap soapModel = new CountrySoap();
032    
033                    soapModel.setCountryId(model.getCountryId());
034                    soapModel.setName(model.getName());
035                    soapModel.setA2(model.getA2());
036                    soapModel.setA3(model.getA3());
037                    soapModel.setNumber(model.getNumber());
038                    soapModel.setIdd(model.getIdd());
039                    soapModel.setZipRequired(model.getZipRequired());
040                    soapModel.setActive(model.getActive());
041    
042                    return soapModel;
043            }
044    
045            public static CountrySoap[] toSoapModels(Country[] models) {
046                    CountrySoap[] soapModels = new CountrySoap[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 CountrySoap[][] toSoapModels(Country[][] models) {
056                    CountrySoap[][] soapModels = null;
057    
058                    if (models.length > 0) {
059                            soapModels = new CountrySoap[models.length][models[0].length];
060                    }
061                    else {
062                            soapModels = new CountrySoap[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 CountrySoap[] toSoapModels(List<Country> models) {
073                    List<CountrySoap> soapModels = new ArrayList<CountrySoap>(models.size());
074    
075                    for (Country model : models) {
076                            soapModels.add(toSoapModel(model));
077                    }
078    
079                    return soapModels.toArray(new CountrySoap[soapModels.size()]);
080            }
081    
082            public CountrySoap() {
083            }
084    
085            public long getPrimaryKey() {
086                    return _countryId;
087            }
088    
089            public void setPrimaryKey(long pk) {
090                    setCountryId(pk);
091            }
092    
093            public long getCountryId() {
094                    return _countryId;
095            }
096    
097            public void setCountryId(long countryId) {
098                    _countryId = countryId;
099            }
100    
101            public String getName() {
102                    return _name;
103            }
104    
105            public void setName(String name) {
106                    _name = name;
107            }
108    
109            public String getA2() {
110                    return _a2;
111            }
112    
113            public void setA2(String a2) {
114                    _a2 = a2;
115            }
116    
117            public String getA3() {
118                    return _a3;
119            }
120    
121            public void setA3(String a3) {
122                    _a3 = a3;
123            }
124    
125            public String getNumber() {
126                    return _number;
127            }
128    
129            public void setNumber(String number) {
130                    _number = number;
131            }
132    
133            public String getIdd() {
134                    return _idd;
135            }
136    
137            public void setIdd(String idd) {
138                    _idd = idd;
139            }
140    
141            public boolean getZipRequired() {
142                    return _zipRequired;
143            }
144    
145            public boolean isZipRequired() {
146                    return _zipRequired;
147            }
148    
149            public void setZipRequired(boolean zipRequired) {
150                    _zipRequired = zipRequired;
151            }
152    
153            public boolean getActive() {
154                    return _active;
155            }
156    
157            public boolean isActive() {
158                    return _active;
159            }
160    
161            public void setActive(boolean active) {
162                    _active = active;
163            }
164    
165            private long _countryId;
166            private String _name;
167            private String _a2;
168            private String _a3;
169            private String _number;
170            private String _idd;
171            private boolean _zipRequired;
172            private boolean _active;
173    }