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