1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.announcements.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="AnnouncementsFlagSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.announcements.service.http.AnnouncementsFlagServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.announcements.service.http.AnnouncementsFlagServiceSoap
38   * @generated
39   */
40  public class AnnouncementsFlagSoap implements Serializable {
41      public static AnnouncementsFlagSoap toSoapModel(AnnouncementsFlag model) {
42          AnnouncementsFlagSoap soapModel = new AnnouncementsFlagSoap();
43  
44          soapModel.setFlagId(model.getFlagId());
45          soapModel.setUserId(model.getUserId());
46          soapModel.setCreateDate(model.getCreateDate());
47          soapModel.setEntryId(model.getEntryId());
48          soapModel.setValue(model.getValue());
49  
50          return soapModel;
51      }
52  
53      public static AnnouncementsFlagSoap[] toSoapModels(
54          AnnouncementsFlag[] models) {
55          AnnouncementsFlagSoap[] soapModels = new AnnouncementsFlagSoap[models.length];
56  
57          for (int i = 0; i < models.length; i++) {
58              soapModels[i] = toSoapModel(models[i]);
59          }
60  
61          return soapModels;
62      }
63  
64      public static AnnouncementsFlagSoap[][] toSoapModels(
65          AnnouncementsFlag[][] models) {
66          AnnouncementsFlagSoap[][] soapModels = null;
67  
68          if (models.length > 0) {
69              soapModels = new AnnouncementsFlagSoap[models.length][models[0].length];
70          }
71          else {
72              soapModels = new AnnouncementsFlagSoap[0][0];
73          }
74  
75          for (int i = 0; i < models.length; i++) {
76              soapModels[i] = toSoapModels(models[i]);
77          }
78  
79          return soapModels;
80      }
81  
82      public static AnnouncementsFlagSoap[] toSoapModels(
83          List<AnnouncementsFlag> models) {
84          List<AnnouncementsFlagSoap> soapModels = new ArrayList<AnnouncementsFlagSoap>(models.size());
85  
86          for (AnnouncementsFlag model : models) {
87              soapModels.add(toSoapModel(model));
88          }
89  
90          return soapModels.toArray(new AnnouncementsFlagSoap[soapModels.size()]);
91      }
92  
93      public AnnouncementsFlagSoap() {
94      }
95  
96      public long getPrimaryKey() {
97          return _flagId;
98      }
99  
100     public void setPrimaryKey(long pk) {
101         setFlagId(pk);
102     }
103 
104     public long getFlagId() {
105         return _flagId;
106     }
107 
108     public void setFlagId(long flagId) {
109         _flagId = flagId;
110     }
111 
112     public long getUserId() {
113         return _userId;
114     }
115 
116     public void setUserId(long userId) {
117         _userId = userId;
118     }
119 
120     public Date getCreateDate() {
121         return _createDate;
122     }
123 
124     public void setCreateDate(Date createDate) {
125         _createDate = createDate;
126     }
127 
128     public long getEntryId() {
129         return _entryId;
130     }
131 
132     public void setEntryId(long entryId) {
133         _entryId = entryId;
134     }
135 
136     public int getValue() {
137         return _value;
138     }
139 
140     public void setValue(int value) {
141         _value = value;
142     }
143 
144     private long _flagId;
145     private long _userId;
146     private Date _createDate;
147     private long _entryId;
148     private int _value;
149 }