1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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.portal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="PortletPreferencesSoap.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   * {@link com.liferay.portal.service.http.PortletPreferencesServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portal.service.http.PortletPreferencesServiceSoap
45   * @generated
46   */
47  public class PortletPreferencesSoap implements Serializable {
48      public static PortletPreferencesSoap toSoapModel(PortletPreferences model) {
49          PortletPreferencesSoap soapModel = new PortletPreferencesSoap();
50  
51          soapModel.setPortletPreferencesId(model.getPortletPreferencesId());
52          soapModel.setOwnerId(model.getOwnerId());
53          soapModel.setOwnerType(model.getOwnerType());
54          soapModel.setPlid(model.getPlid());
55          soapModel.setPortletId(model.getPortletId());
56          soapModel.setPreferences(model.getPreferences());
57  
58          return soapModel;
59      }
60  
61      public static PortletPreferencesSoap[] toSoapModels(
62          PortletPreferences[] models) {
63          PortletPreferencesSoap[] soapModels = new PortletPreferencesSoap[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 PortletPreferencesSoap[][] toSoapModels(
73          PortletPreferences[][] models) {
74          PortletPreferencesSoap[][] soapModels = null;
75  
76          if (models.length > 0) {
77              soapModels = new PortletPreferencesSoap[models.length][models[0].length];
78          }
79          else {
80              soapModels = new PortletPreferencesSoap[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 PortletPreferencesSoap[] toSoapModels(
91          List<PortletPreferences> models) {
92          List<PortletPreferencesSoap> soapModels = new ArrayList<PortletPreferencesSoap>(models.size());
93  
94          for (PortletPreferences model : models) {
95              soapModels.add(toSoapModel(model));
96          }
97  
98          return soapModels.toArray(new PortletPreferencesSoap[soapModels.size()]);
99      }
100 
101     public PortletPreferencesSoap() {
102     }
103 
104     public long getPrimaryKey() {
105         return _portletPreferencesId;
106     }
107 
108     public void setPrimaryKey(long pk) {
109         setPortletPreferencesId(pk);
110     }
111 
112     public long getPortletPreferencesId() {
113         return _portletPreferencesId;
114     }
115 
116     public void setPortletPreferencesId(long portletPreferencesId) {
117         _portletPreferencesId = portletPreferencesId;
118     }
119 
120     public long getOwnerId() {
121         return _ownerId;
122     }
123 
124     public void setOwnerId(long ownerId) {
125         _ownerId = ownerId;
126     }
127 
128     public int getOwnerType() {
129         return _ownerType;
130     }
131 
132     public void setOwnerType(int ownerType) {
133         _ownerType = ownerType;
134     }
135 
136     public long getPlid() {
137         return _plid;
138     }
139 
140     public void setPlid(long plid) {
141         _plid = plid;
142     }
143 
144     public String getPortletId() {
145         return _portletId;
146     }
147 
148     public void setPortletId(String portletId) {
149         _portletId = portletId;
150     }
151 
152     public String getPreferences() {
153         return _preferences;
154     }
155 
156     public void setPreferences(String preferences) {
157         _preferences = preferences;
158     }
159 
160     private long _portletPreferencesId;
161     private long _ownerId;
162     private int _ownerType;
163     private long _plid;
164     private String _portletId;
165     private String _preferences;
166 }