001
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
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.setActive(model.getActive());
040
041 return soapModel;
042 }
043
044 public static CountrySoap[] toSoapModels(Country[] models) {
045 CountrySoap[] soapModels = new CountrySoap[models.length];
046
047 for (int i = 0; i < models.length; i++) {
048 soapModels[i] = toSoapModel(models[i]);
049 }
050
051 return soapModels;
052 }
053
054 public static CountrySoap[][] toSoapModels(Country[][] models) {
055 CountrySoap[][] soapModels = null;
056
057 if (models.length > 0) {
058 soapModels = new CountrySoap[models.length][models[0].length];
059 }
060 else {
061 soapModels = new CountrySoap[0][0];
062 }
063
064 for (int i = 0; i < models.length; i++) {
065 soapModels[i] = toSoapModels(models[i]);
066 }
067
068 return soapModels;
069 }
070
071 public static CountrySoap[] toSoapModels(List<Country> models) {
072 List<CountrySoap> soapModels = new ArrayList<CountrySoap>(models.size());
073
074 for (Country model : models) {
075 soapModels.add(toSoapModel(model));
076 }
077
078 return soapModels.toArray(new CountrySoap[soapModels.size()]);
079 }
080
081 public CountrySoap() {
082 }
083
084 public long getPrimaryKey() {
085 return _countryId;
086 }
087
088 public void setPrimaryKey(long pk) {
089 setCountryId(pk);
090 }
091
092 public long getCountryId() {
093 return _countryId;
094 }
095
096 public void setCountryId(long countryId) {
097 _countryId = countryId;
098 }
099
100 public String getName() {
101 return _name;
102 }
103
104 public void setName(String name) {
105 _name = name;
106 }
107
108 public String getA2() {
109 return _a2;
110 }
111
112 public void setA2(String a2) {
113 _a2 = a2;
114 }
115
116 public String getA3() {
117 return _a3;
118 }
119
120 public void setA3(String a3) {
121 _a3 = a3;
122 }
123
124 public String getNumber() {
125 return _number;
126 }
127
128 public void setNumber(String number) {
129 _number = number;
130 }
131
132 public String getIdd() {
133 return _idd;
134 }
135
136 public void setIdd(String idd) {
137 _idd = idd;
138 }
139
140 public boolean getActive() {
141 return _active;
142 }
143
144 public boolean isActive() {
145 return _active;
146 }
147
148 public void setActive(boolean active) {
149 _active = active;
150 }
151
152 private long _countryId;
153 private String _name;
154 private String _a2;
155 private String _a3;
156 private String _number;
157 private String _idd;
158 private boolean _active;
159 }