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.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="PortletSoap.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.PortletServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.PortletServiceSoap
37   * @generated
38   */
39  public class PortletSoap implements Serializable {
40      public static PortletSoap toSoapModel(Portlet model) {
41          PortletSoap soapModel = new PortletSoap();
42  
43          soapModel.setId(model.getId());
44          soapModel.setCompanyId(model.getCompanyId());
45          soapModel.setPortletId(model.getPortletId());
46          soapModel.setRoles(model.getRoles());
47          soapModel.setActive(model.getActive());
48  
49          return soapModel;
50      }
51  
52      public static PortletSoap[] toSoapModels(Portlet[] models) {
53          PortletSoap[] soapModels = new PortletSoap[models.length];
54  
55          for (int i = 0; i < models.length; i++) {
56              soapModels[i] = toSoapModel(models[i]);
57          }
58  
59          return soapModels;
60      }
61  
62      public static PortletSoap[][] toSoapModels(Portlet[][] models) {
63          PortletSoap[][] soapModels = null;
64  
65          if (models.length > 0) {
66              soapModels = new PortletSoap[models.length][models[0].length];
67          }
68          else {
69              soapModels = new PortletSoap[0][0];
70          }
71  
72          for (int i = 0; i < models.length; i++) {
73              soapModels[i] = toSoapModels(models[i]);
74          }
75  
76          return soapModels;
77      }
78  
79      public static PortletSoap[] toSoapModels(List<Portlet> models) {
80          List<PortletSoap> soapModels = new ArrayList<PortletSoap>(models.size());
81  
82          for (Portlet model : models) {
83              soapModels.add(toSoapModel(model));
84          }
85  
86          return soapModels.toArray(new PortletSoap[soapModels.size()]);
87      }
88  
89      public PortletSoap() {
90      }
91  
92      public long getPrimaryKey() {
93          return _id;
94      }
95  
96      public void setPrimaryKey(long pk) {
97          setId(pk);
98      }
99  
100     public long getId() {
101         return _id;
102     }
103 
104     public void setId(long id) {
105         _id = id;
106     }
107 
108     public long getCompanyId() {
109         return _companyId;
110     }
111 
112     public void setCompanyId(long companyId) {
113         _companyId = companyId;
114     }
115 
116     public String getPortletId() {
117         return _portletId;
118     }
119 
120     public void setPortletId(String portletId) {
121         _portletId = portletId;
122     }
123 
124     public String getRoles() {
125         return _roles;
126     }
127 
128     public void setRoles(String roles) {
129         _roles = roles;
130     }
131 
132     public boolean getActive() {
133         return _active;
134     }
135 
136     public boolean isActive() {
137         return _active;
138     }
139 
140     public void setActive(boolean active) {
141         _active = active;
142     }
143 
144     private long _id;
145     private long _companyId;
146     private String _portletId;
147     private String _roles;
148     private boolean _active;
149 }