1
22
23 package com.liferay.portal.model;
24
25 import java.io.Serializable;
26
27 import java.util.ArrayList;
28 import java.util.List;
29
30
47 public class CountrySoap implements Serializable {
48 public static CountrySoap toSoapModel(Country model) {
49 CountrySoap soapModel = new CountrySoap();
50
51 soapModel.setCountryId(model.getCountryId());
52 soapModel.setName(model.getName());
53 soapModel.setA2(model.getA2());
54 soapModel.setA3(model.getA3());
55 soapModel.setNumber(model.getNumber());
56 soapModel.setIdd(model.getIdd());
57 soapModel.setActive(model.getActive());
58
59 return soapModel;
60 }
61
62 public static CountrySoap[] toSoapModels(Country[] models) {
63 CountrySoap[] soapModels = new CountrySoap[models.length];
64
65 for (int i = 0; i < models.length; i++) {
66 soapModels[i] = toSoapModel(models[i]);
67 }
68
69 return soapModels;
70 }
71
72 public static CountrySoap[][] toSoapModels(Country[][] models) {
73 CountrySoap[][] soapModels = null;
74
75 if (models.length > 0) {
76 soapModels = new CountrySoap[models.length][models[0].length];
77 }
78 else {
79 soapModels = new CountrySoap[0][0];
80 }
81
82 for (int i = 0; i < models.length; i++) {
83 soapModels[i] = toSoapModels(models[i]);
84 }
85
86 return soapModels;
87 }
88
89 public static CountrySoap[] toSoapModels(List<Country> models) {
90 List<CountrySoap> soapModels = new ArrayList<CountrySoap>(models.size());
91
92 for (Country model : models) {
93 soapModels.add(toSoapModel(model));
94 }
95
96 return soapModels.toArray(new CountrySoap[soapModels.size()]);
97 }
98
99 public CountrySoap() {
100 }
101
102 public long getPrimaryKey() {
103 return _countryId;
104 }
105
106 public void setPrimaryKey(long pk) {
107 setCountryId(pk);
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 getName() {
119 return _name;
120 }
121
122 public void setName(String name) {
123 _name = name;
124 }
125
126 public String getA2() {
127 return _a2;
128 }
129
130 public void setA2(String a2) {
131 _a2 = a2;
132 }
133
134 public String getA3() {
135 return _a3;
136 }
137
138 public void setA3(String a3) {
139 _a3 = a3;
140 }
141
142 public String getNumber() {
143 return _number;
144 }
145
146 public void setNumber(String number) {
147 _number = number;
148 }
149
150 public String getIdd() {
151 return _idd;
152 }
153
154 public void setIdd(String idd) {
155 _idd = idd;
156 }
157
158 public boolean getActive() {
159 return _active;
160 }
161
162 public boolean isActive() {
163 return _active;
164 }
165
166 public void setActive(boolean active) {
167 _active = active;
168 }
169
170 private long _countryId;
171 private String _name;
172 private String _a2;
173 private String _a3;
174 private String _number;
175 private String _idd;
176 private boolean _active;
177 }