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