1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.announcements.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * <a href="AnnouncementsDeliverySoap.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class is used by
37   * <code>com.liferay.portlet.announcements.service.http.AnnouncementsDeliveryServiceSoap</code>.
38   * </p>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   * @see com.liferay.portlet.announcements.service.http.AnnouncementsDeliveryServiceSoap
43   *
44   */
45  public class AnnouncementsDeliverySoap implements Serializable {
46      public static AnnouncementsDeliverySoap toSoapModel(
47          AnnouncementsDelivery model) {
48          AnnouncementsDeliverySoap soapModel = new AnnouncementsDeliverySoap();
49  
50          soapModel.setDeliveryId(model.getDeliveryId());
51          soapModel.setCompanyId(model.getCompanyId());
52          soapModel.setUserId(model.getUserId());
53          soapModel.setType(model.getType());
54          soapModel.setEmail(model.getEmail());
55          soapModel.setSms(model.getSms());
56          soapModel.setWebsite(model.getWebsite());
57  
58          return soapModel;
59      }
60  
61      public static AnnouncementsDeliverySoap[] toSoapModels(
62          AnnouncementsDelivery[] models) {
63          AnnouncementsDeliverySoap[] soapModels = new AnnouncementsDeliverySoap[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 AnnouncementsDeliverySoap[][] toSoapModels(
73          AnnouncementsDelivery[][] models) {
74          AnnouncementsDeliverySoap[][] soapModels = null;
75  
76          if (models.length > 0) {
77              soapModels = new AnnouncementsDeliverySoap[models.length][models[0].length];
78          }
79          else {
80              soapModels = new AnnouncementsDeliverySoap[0][0];
81          }
82  
83          for (int i = 0; i < models.length; i++) {
84              soapModels[i] = toSoapModels(models[i]);
85          }
86  
87          return soapModels;
88      }
89  
90      public static AnnouncementsDeliverySoap[] toSoapModels(
91          List<AnnouncementsDelivery> models) {
92          List<AnnouncementsDeliverySoap> soapModels = new ArrayList<AnnouncementsDeliverySoap>(models.size());
93  
94          for (AnnouncementsDelivery model : models) {
95              soapModels.add(toSoapModel(model));
96          }
97  
98          return soapModels.toArray(new AnnouncementsDeliverySoap[soapModels.size()]);
99      }
100 
101     public AnnouncementsDeliverySoap() {
102     }
103 
104     public long getPrimaryKey() {
105         return _deliveryId;
106     }
107 
108     public void setPrimaryKey(long pk) {
109         setDeliveryId(pk);
110     }
111 
112     public long getDeliveryId() {
113         return _deliveryId;
114     }
115 
116     public void setDeliveryId(long deliveryId) {
117         _deliveryId = deliveryId;
118     }
119 
120     public long getCompanyId() {
121         return _companyId;
122     }
123 
124     public void setCompanyId(long companyId) {
125         _companyId = companyId;
126     }
127 
128     public long getUserId() {
129         return _userId;
130     }
131 
132     public void setUserId(long userId) {
133         _userId = userId;
134     }
135 
136     public String getType() {
137         return _type;
138     }
139 
140     public void setType(String type) {
141         _type = type;
142     }
143 
144     public boolean getEmail() {
145         return _email;
146     }
147 
148     public boolean isEmail() {
149         return _email;
150     }
151 
152     public void setEmail(boolean email) {
153         _email = email;
154     }
155 
156     public boolean getSms() {
157         return _sms;
158     }
159 
160     public boolean isSms() {
161         return _sms;
162     }
163 
164     public void setSms(boolean sms) {
165         _sms = sms;
166     }
167 
168     public boolean getWebsite() {
169         return _website;
170     }
171 
172     public boolean isWebsite() {
173         return _website;
174     }
175 
176     public void setWebsite(boolean website) {
177         _website = website;
178     }
179 
180     private long _deliveryId;
181     private long _companyId;
182     private long _userId;
183     private String _type;
184     private boolean _email;
185     private boolean _sms;
186     private boolean _website;
187 }