001    /**
002     * Copyright (c) 2000-2010 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.Date;
021    import java.util.List;
022    
023    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portal.service.http.WebsiteServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portal.service.http.WebsiteServiceSoap
031     * @generated
032     */
033    public class WebsiteSoap implements Serializable {
034            public static WebsiteSoap toSoapModel(Website model) {
035                    WebsiteSoap soapModel = new WebsiteSoap();
036    
037                    soapModel.setWebsiteId(model.getWebsiteId());
038                    soapModel.setCompanyId(model.getCompanyId());
039                    soapModel.setUserId(model.getUserId());
040                    soapModel.setUserName(model.getUserName());
041                    soapModel.setCreateDate(model.getCreateDate());
042                    soapModel.setModifiedDate(model.getModifiedDate());
043                    soapModel.setClassNameId(model.getClassNameId());
044                    soapModel.setClassPK(model.getClassPK());
045                    soapModel.setUrl(model.getUrl());
046                    soapModel.setTypeId(model.getTypeId());
047                    soapModel.setPrimary(model.getPrimary());
048    
049                    return soapModel;
050            }
051    
052            public static WebsiteSoap[] toSoapModels(Website[] models) {
053                    WebsiteSoap[] soapModels = new WebsiteSoap[models.length];
054    
055                    for (int i = 0; i < models.length; i++) {
056                            soapModels[i] = toSoapModel(models[i]);
057                    }
058    
059                    return soapModels;
060            }
061    
062            public static WebsiteSoap[][] toSoapModels(Website[][] models) {
063                    WebsiteSoap[][] soapModels = null;
064    
065                    if (models.length > 0) {
066                            soapModels = new WebsiteSoap[models.length][models[0].length];
067                    }
068                    else {
069                            soapModels = new WebsiteSoap[0][0];
070                    }
071    
072                    for (int i = 0; i < models.length; i++) {
073                            soapModels[i] = toSoapModels(models[i]);
074                    }
075    
076                    return soapModels;
077            }
078    
079            public static WebsiteSoap[] toSoapModels(List<Website> models) {
080                    List<WebsiteSoap> soapModels = new ArrayList<WebsiteSoap>(models.size());
081    
082                    for (Website model : models) {
083                            soapModels.add(toSoapModel(model));
084                    }
085    
086                    return soapModels.toArray(new WebsiteSoap[soapModels.size()]);
087            }
088    
089            public WebsiteSoap() {
090            }
091    
092            public long getPrimaryKey() {
093                    return _websiteId;
094            }
095    
096            public void setPrimaryKey(long pk) {
097                    setWebsiteId(pk);
098            }
099    
100            public long getWebsiteId() {
101                    return _websiteId;
102            }
103    
104            public void setWebsiteId(long websiteId) {
105                    _websiteId = websiteId;
106            }
107    
108            public long getCompanyId() {
109                    return _companyId;
110            }
111    
112            public void setCompanyId(long companyId) {
113                    _companyId = companyId;
114            }
115    
116            public long getUserId() {
117                    return _userId;
118            }
119    
120            public void setUserId(long userId) {
121                    _userId = userId;
122            }
123    
124            public String getUserName() {
125                    return _userName;
126            }
127    
128            public void setUserName(String userName) {
129                    _userName = userName;
130            }
131    
132            public Date getCreateDate() {
133                    return _createDate;
134            }
135    
136            public void setCreateDate(Date createDate) {
137                    _createDate = createDate;
138            }
139    
140            public Date getModifiedDate() {
141                    return _modifiedDate;
142            }
143    
144            public void setModifiedDate(Date modifiedDate) {
145                    _modifiedDate = modifiedDate;
146            }
147    
148            public long getClassNameId() {
149                    return _classNameId;
150            }
151    
152            public void setClassNameId(long classNameId) {
153                    _classNameId = classNameId;
154            }
155    
156            public long getClassPK() {
157                    return _classPK;
158            }
159    
160            public void setClassPK(long classPK) {
161                    _classPK = classPK;
162            }
163    
164            public String getUrl() {
165                    return _url;
166            }
167    
168            public void setUrl(String url) {
169                    _url = url;
170            }
171    
172            public int getTypeId() {
173                    return _typeId;
174            }
175    
176            public void setTypeId(int typeId) {
177                    _typeId = typeId;
178            }
179    
180            public boolean getPrimary() {
181                    return _primary;
182            }
183    
184            public boolean isPrimary() {
185                    return _primary;
186            }
187    
188            public void setPrimary(boolean primary) {
189                    _primary = primary;
190            }
191    
192            private long _websiteId;
193            private long _companyId;
194            private long _userId;
195            private String _userName;
196            private Date _createDate;
197            private Date _modifiedDate;
198            private long _classNameId;
199            private long _classPK;
200            private String _url;
201            private int _typeId;
202            private boolean _primary;
203    }