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.
026     *
027     * @author Brian Wing Shun Chan
028     * @generated
029     */
030    @ProviderType
031    public class PortalPreferencesSoap implements Serializable {
032            public static PortalPreferencesSoap toSoapModel(PortalPreferences model) {
033                    PortalPreferencesSoap soapModel = new PortalPreferencesSoap();
034    
035                    soapModel.setMvccVersion(model.getMvccVersion());
036                    soapModel.setPortalPreferencesId(model.getPortalPreferencesId());
037                    soapModel.setOwnerId(model.getOwnerId());
038                    soapModel.setOwnerType(model.getOwnerType());
039                    soapModel.setPreferences(model.getPreferences());
040    
041                    return soapModel;
042            }
043    
044            public static PortalPreferencesSoap[] toSoapModels(
045                    PortalPreferences[] models) {
046                    PortalPreferencesSoap[] soapModels = new PortalPreferencesSoap[models.length];
047    
048                    for (int i = 0; i < models.length; i++) {
049                            soapModels[i] = toSoapModel(models[i]);
050                    }
051    
052                    return soapModels;
053            }
054    
055            public static PortalPreferencesSoap[][] toSoapModels(
056                    PortalPreferences[][] models) {
057                    PortalPreferencesSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new PortalPreferencesSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new PortalPreferencesSoap[0][0];
064                    }
065    
066                    for (int i = 0; i < models.length; i++) {
067                            soapModels[i] = toSoapModels(models[i]);
068                    }
069    
070                    return soapModels;
071            }
072    
073            public static PortalPreferencesSoap[] toSoapModels(
074                    List<PortalPreferences> models) {
075                    List<PortalPreferencesSoap> soapModels = new ArrayList<PortalPreferencesSoap>(models.size());
076    
077                    for (PortalPreferences model : models) {
078                            soapModels.add(toSoapModel(model));
079                    }
080    
081                    return soapModels.toArray(new PortalPreferencesSoap[soapModels.size()]);
082            }
083    
084            public PortalPreferencesSoap() {
085            }
086    
087            public long getPrimaryKey() {
088                    return _portalPreferencesId;
089            }
090    
091            public void setPrimaryKey(long pk) {
092                    setPortalPreferencesId(pk);
093            }
094    
095            public long getMvccVersion() {
096                    return _mvccVersion;
097            }
098    
099            public void setMvccVersion(long mvccVersion) {
100                    _mvccVersion = mvccVersion;
101            }
102    
103            public long getPortalPreferencesId() {
104                    return _portalPreferencesId;
105            }
106    
107            public void setPortalPreferencesId(long portalPreferencesId) {
108                    _portalPreferencesId = portalPreferencesId;
109            }
110    
111            public long getOwnerId() {
112                    return _ownerId;
113            }
114    
115            public void setOwnerId(long ownerId) {
116                    _ownerId = ownerId;
117            }
118    
119            public int getOwnerType() {
120                    return _ownerType;
121            }
122    
123            public void setOwnerType(int ownerType) {
124                    _ownerType = ownerType;
125            }
126    
127            public String getPreferences() {
128                    return _preferences;
129            }
130    
131            public void setPreferences(String preferences) {
132                    _preferences = preferences;
133            }
134    
135            private long _mvccVersion;
136            private long _portalPreferencesId;
137            private long _ownerId;
138            private int _ownerType;
139            private String _preferences;
140    }