1   /**
2    * Copyright (c) 2000-2010 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   *
12   *
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="PortletPreferencesSoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portal.service.http.PortletPreferencesServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.PortletPreferencesServiceSoap
37   * @generated
38   */
39  public class PortletPreferencesSoap implements Serializable {
40      public static PortletPreferencesSoap toSoapModel(PortletPreferences model) {
41          PortletPreferencesSoap soapModel = new PortletPreferencesSoap();
42  
43          soapModel.setPortletPreferencesId(model.getPortletPreferencesId());
44          soapModel.setOwnerId(model.getOwnerId());
45          soapModel.setOwnerType(model.getOwnerType());
46          soapModel.setPlid(model.getPlid());
47          soapModel.setPortletId(model.getPortletId());
48          soapModel.setPreferences(model.getPreferences());
49  
50          return soapModel;
51      }
52  
53      public static PortletPreferencesSoap[] toSoapModels(
54          PortletPreferences[] models) {
55          PortletPreferencesSoap[] soapModels = new PortletPreferencesSoap[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 PortletPreferencesSoap[][] toSoapModels(
65          PortletPreferences[][] models) {
66          PortletPreferencesSoap[][] soapModels = null;
67  
68          if (models.length > 0) {
69              soapModels = new PortletPreferencesSoap[models.length][models[0].length];
70          }
71          else {
72              soapModels = new PortletPreferencesSoap[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 PortletPreferencesSoap[] toSoapModels(
83          List<PortletPreferences> models) {
84          List<PortletPreferencesSoap> soapModels = new ArrayList<PortletPreferencesSoap>(models.size());
85  
86          for (PortletPreferences model : models) {
87              soapModels.add(toSoapModel(model));
88          }
89  
90          return soapModels.toArray(new PortletPreferencesSoap[soapModels.size()]);
91      }
92  
93      public PortletPreferencesSoap() {
94      }
95  
96      public long getPrimaryKey() {
97          return _portletPreferencesId;
98      }
99  
100     public void setPrimaryKey(long pk) {
101         setPortletPreferencesId(pk);
102     }
103 
104     public long getPortletPreferencesId() {
105         return _portletPreferencesId;
106     }
107 
108     public void setPortletPreferencesId(long portletPreferencesId) {
109         _portletPreferencesId = portletPreferencesId;
110     }
111 
112     public long getOwnerId() {
113         return _ownerId;
114     }
115 
116     public void setOwnerId(long ownerId) {
117         _ownerId = ownerId;
118     }
119 
120     public int getOwnerType() {
121         return _ownerType;
122     }
123 
124     public void setOwnerType(int ownerType) {
125         _ownerType = ownerType;
126     }
127 
128     public long getPlid() {
129         return _plid;
130     }
131 
132     public void setPlid(long plid) {
133         _plid = plid;
134     }
135 
136     public String getPortletId() {
137         return _portletId;
138     }
139 
140     public void setPortletId(String portletId) {
141         _portletId = portletId;
142     }
143 
144     public String getPreferences() {
145         return _preferences;
146     }
147 
148     public void setPreferences(String preferences) {
149         _preferences = preferences;
150     }
151 
152     private long _portletPreferencesId;
153     private long _ownerId;
154     private int _ownerType;
155     private long _plid;
156     private String _portletId;
157     private String _preferences;
158 }