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.setOwnerId(model.getOwnerId());
039                    soapModel.setOwnerType(model.getOwnerType());
040                    soapModel.setPlid(model.getPlid());
041                    soapModel.setPortletId(model.getPortletId());
042                    soapModel.setPreferences(model.getPreferences());
043    
044                    return soapModel;
045            }
046    
047            public static PortletPreferencesSoap[] toSoapModels(
048                    PortletPreferences[] models) {
049                    PortletPreferencesSoap[] soapModels = new PortletPreferencesSoap[models.length];
050    
051                    for (int i = 0; i < models.length; i++) {
052                            soapModels[i] = toSoapModel(models[i]);
053                    }
054    
055                    return soapModels;
056            }
057    
058            public static PortletPreferencesSoap[][] toSoapModels(
059                    PortletPreferences[][] models) {
060                    PortletPreferencesSoap[][] soapModels = null;
061    
062                    if (models.length > 0) {
063                            soapModels = new PortletPreferencesSoap[models.length][models[0].length];
064                    }
065                    else {
066                            soapModels = new PortletPreferencesSoap[0][0];
067                    }
068    
069                    for (int i = 0; i < models.length; i++) {
070                            soapModels[i] = toSoapModels(models[i]);
071                    }
072    
073                    return soapModels;
074            }
075    
076            public static PortletPreferencesSoap[] toSoapModels(
077                    List<PortletPreferences> models) {
078                    List<PortletPreferencesSoap> soapModels = new ArrayList<PortletPreferencesSoap>(models.size());
079    
080                    for (PortletPreferences model : models) {
081                            soapModels.add(toSoapModel(model));
082                    }
083    
084                    return soapModels.toArray(new PortletPreferencesSoap[soapModels.size()]);
085            }
086    
087            public PortletPreferencesSoap() {
088            }
089    
090            public long getPrimaryKey() {
091                    return _portletPreferencesId;
092            }
093    
094            public void setPrimaryKey(long pk) {
095                    setPortletPreferencesId(pk);
096            }
097    
098            public long getMvccVersion() {
099                    return _mvccVersion;
100            }
101    
102            public void setMvccVersion(long mvccVersion) {
103                    _mvccVersion = mvccVersion;
104            }
105    
106            public long getPortletPreferencesId() {
107                    return _portletPreferencesId;
108            }
109    
110            public void setPortletPreferencesId(long portletPreferencesId) {
111                    _portletPreferencesId = portletPreferencesId;
112            }
113    
114            public long getOwnerId() {
115                    return _ownerId;
116            }
117    
118            public void setOwnerId(long ownerId) {
119                    _ownerId = ownerId;
120            }
121    
122            public int getOwnerType() {
123                    return _ownerType;
124            }
125    
126            public void setOwnerType(int ownerType) {
127                    _ownerType = ownerType;
128            }
129    
130            public long getPlid() {
131                    return _plid;
132            }
133    
134            public void setPlid(long plid) {
135                    _plid = plid;
136            }
137    
138            public String getPortletId() {
139                    return _portletId;
140            }
141    
142            public void setPortletId(String portletId) {
143                    _portletId = portletId;
144            }
145    
146            public String getPreferences() {
147                    return _preferences;
148            }
149    
150            public void setPreferences(String preferences) {
151                    _preferences = preferences;
152            }
153    
154            private long _mvccVersion;
155            private long _portletPreferencesId;
156            private long _ownerId;
157            private int _ownerType;
158            private long _plid;
159            private String _portletId;
160            private String _preferences;
161    }