1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.wsrp.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="WSRPPortletSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * <code>com.liferay.wsrp.service.http.WSRPPortletServiceSoap</code>.
41   * </p>
42   *
43   * @author Brian Wing Shun Chan
44   *
45   * @see com.liferay.wsrp.service.http.WSRPPortletServiceSoap
46   *
47   */
48  public class WSRPPortletSoap implements Serializable {
49      public static WSRPPortletSoap toSoapModel(WSRPPortlet model) {
50          WSRPPortletSoap soapModel = new WSRPPortletSoap();
51  
52          soapModel.setPortletId(model.getPortletId());
53          soapModel.setName(model.getName());
54          soapModel.setChannelName(model.getChannelName());
55          soapModel.setTitle(model.getTitle());
56          soapModel.setShortTitle(model.getShortTitle());
57          soapModel.setDisplayName(model.getDisplayName());
58          soapModel.setKeywords(model.getKeywords());
59          soapModel.setStatus(model.getStatus());
60          soapModel.setProducerEntityId(model.getProducerEntityId());
61          soapModel.setConsumerId(model.getConsumerId());
62          soapModel.setPortletHandle(model.getPortletHandle());
63          soapModel.setMimeTypes(model.getMimeTypes());
64  
65          return soapModel;
66      }
67  
68      public static WSRPPortletSoap[] toSoapModels(List<WSRPPortlet> models) {
69          List<WSRPPortletSoap> soapModels = new ArrayList<WSRPPortletSoap>(models.size());
70  
71          for (WSRPPortlet model : models) {
72              soapModels.add(toSoapModel(model));
73          }
74  
75          return soapModels.toArray(new WSRPPortletSoap[soapModels.size()]);
76      }
77  
78      public WSRPPortletSoap() {
79      }
80  
81      public long getPrimaryKey() {
82          return _portletId;
83      }
84  
85      public void setPrimaryKey(long pk) {
86          setPortletId(pk);
87      }
88  
89      public long getPortletId() {
90          return _portletId;
91      }
92  
93      public void setPortletId(long portletId) {
94          _portletId = portletId;
95      }
96  
97      public String getName() {
98          return _name;
99      }
100 
101     public void setName(String name) {
102         _name = name;
103     }
104 
105     public String getChannelName() {
106         return _channelName;
107     }
108 
109     public void setChannelName(String channelName) {
110         _channelName = channelName;
111     }
112 
113     public String getTitle() {
114         return _title;
115     }
116 
117     public void setTitle(String title) {
118         _title = title;
119     }
120 
121     public String getShortTitle() {
122         return _shortTitle;
123     }
124 
125     public void setShortTitle(String shortTitle) {
126         _shortTitle = shortTitle;
127     }
128 
129     public String getDisplayName() {
130         return _displayName;
131     }
132 
133     public void setDisplayName(String displayName) {
134         _displayName = displayName;
135     }
136 
137     public String getKeywords() {
138         return _keywords;
139     }
140 
141     public void setKeywords(String keywords) {
142         _keywords = keywords;
143     }
144 
145     public int getStatus() {
146         return _status;
147     }
148 
149     public void setStatus(int status) {
150         _status = status;
151     }
152 
153     public String getProducerEntityId() {
154         return _producerEntityId;
155     }
156 
157     public void setProducerEntityId(String producerEntityId) {
158         _producerEntityId = producerEntityId;
159     }
160 
161     public String getConsumerId() {
162         return _consumerId;
163     }
164 
165     public void setConsumerId(String consumerId) {
166         _consumerId = consumerId;
167     }
168 
169     public String getPortletHandle() {
170         return _portletHandle;
171     }
172 
173     public void setPortletHandle(String portletHandle) {
174         _portletHandle = portletHandle;
175     }
176 
177     public String getMimeTypes() {
178         return _mimeTypes;
179     }
180 
181     public void setMimeTypes(String mimeTypes) {
182         _mimeTypes = mimeTypes;
183     }
184 
185     private long _portletId;
186     private String _name;
187     private String _channelName;
188     private String _title;
189     private String _shortTitle;
190     private String _displayName;
191     private String _keywords;
192     private int _status;
193     private String _producerEntityId;
194     private String _consumerId;
195     private String _portletHandle;
196     private String _mimeTypes;
197 }