001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.io.Serializable;
020    
021    import java.util.ArrayList;
022    import java.util.List;
023    
024    /**
025     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.PortletPreferencesServiceSoap}.
026     *
027     * @author Brian Wing Shun Chan
028     * @see com.liferay.portal.service.http.PortletPreferencesServiceSoap
029     * @generated
030     */
031    @ProviderType
032    public class PortletPreferencesSoap implements Serializable {
033            public static PortletPreferencesSoap toSoapModel(PortletPreferences model) {
034                    PortletPreferencesSoap soapModel = new PortletPreferencesSoap();
035    
036                    soapModel.setMvccVersion(model.getMvccVersion());
037                    soapModel.setPortletPreferencesId(model.getPortletPreferencesId());
038                    soapModel.setCompanyId(model.getCompanyId());
039                    soapModel.setOwnerId(model.getOwnerId());
040                    soapModel.setOwnerType(model.getOwnerType());
041                    soapModel.setPlid(model.getPlid());
042                    soapModel.setPortletId(model.getPortletId());
043                    soapModel.setPreferences(model.getPreferences());
044    
045                    return soapModel;
046            }
047    
048            public static PortletPreferencesSoap[] toSoapModels(
049                    PortletPreferences[] models) {
050                    PortletPreferencesSoap[] soapModels = new PortletPreferencesSoap[models.length];
051    
052                    for (int i = 0; i < models.length; i++) {
053                            soapModels[i] = toSoapModel(models[i]);
054                    }
055    
056                    return soapModels;
057            }
058    
059            public static PortletPreferencesSoap[][] toSoapModels(
060                    PortletPreferences[][] models) {
061                    PortletPreferencesSoap[][] soapModels = null;
062    
063                    if (models.length > 0) {
064                            soapModels = new PortletPreferencesSoap[models.length][models[0].length];
065                    }
066                    else {
067                            soapModels = new PortletPreferencesSoap[0][0];
068                    }
069    
070                    for (int i = 0; i < models.length; i++) {
071                            soapModels[i] = toSoapModels(models[i]);
072                    }
073    
074                    return soapModels;
075            }
076    
077            public static PortletPreferencesSoap[] toSoapModels(
078                    List<PortletPreferences> models) {
079                    List<PortletPreferencesSoap> soapModels = new ArrayList<PortletPreferencesSoap>(models.size());
080    
081                    for (PortletPreferences model : models) {
082                            soapModels.add(toSoapModel(model));
083                    }
084    
085                    return soapModels.toArray(new PortletPreferencesSoap[soapModels.size()]);
086            }
087    
088            public PortletPreferencesSoap() {
089            }
090    
091            public long getPrimaryKey() {
092                    return _portletPreferencesId;
093            }
094    
095            public void setPrimaryKey(long pk) {
096                    setPortletPreferencesId(pk);
097            }
098    
099            public long getMvccVersion() {
100                    return _mvccVersion;
101            }
102    
103            public void setMvccVersion(long mvccVersion) {
104                    _mvccVersion = mvccVersion;
105            }
106    
107            public long getPortletPreferencesId() {
108                    return _portletPreferencesId;
109            }
110    
111            public void setPortletPreferencesId(long portletPreferencesId) {
112                    _portletPreferencesId = portletPreferencesId;
113            }
114    
115            public long getCompanyId() {
116                    return _companyId;
117            }
118    
119            public void setCompanyId(long companyId) {
120                    _companyId = companyId;
121            }
122    
123            public long getOwnerId() {
124                    return _ownerId;
125            }
126    
127            public void setOwnerId(long ownerId) {
128                    _ownerId = ownerId;
129            }
130    
131            public int getOwnerType() {
132                    return _ownerType;
133            }
134    
135            public void setOwnerType(int ownerType) {
136                    _ownerType = ownerType;
137            }
138    
139            public long getPlid() {
140                    return _plid;
141            }
142    
143            public void setPlid(long plid) {
144                    _plid = plid;
145            }
146    
147            public String getPortletId() {
148                    return _portletId;
149            }
150    
151            public void setPortletId(String portletId) {
152                    _portletId = portletId;
153            }
154    
155            public String getPreferences() {
156                    return _preferences;
157            }
158    
159            public void setPreferences(String preferences) {
160                    _preferences = preferences;
161            }
162    
163            private long _mvccVersion;
164            private long _portletPreferencesId;
165            private long _companyId;
166            private long _ownerId;
167            private int _ownerType;
168            private long _plid;
169            private String _portletId;
170            private String _preferences;
171    }