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.Date;
023    import java.util.List;
024    
025    /**
026     * This class is used by SOAP remote services, specifically {@link com.liferay.portal.service.http.RoleServiceSoap}.
027     *
028     * @author Brian Wing Shun Chan
029     * @see com.liferay.portal.service.http.RoleServiceSoap
030     * @generated
031     */
032    @ProviderType
033    public class RoleSoap implements Serializable {
034            public static RoleSoap toSoapModel(Role model) {
035                    RoleSoap soapModel = new RoleSoap();
036    
037                    soapModel.setMvccVersion(model.getMvccVersion());
038                    soapModel.setUuid(model.getUuid());
039                    soapModel.setRoleId(model.getRoleId());
040                    soapModel.setCompanyId(model.getCompanyId());
041                    soapModel.setUserId(model.getUserId());
042                    soapModel.setUserName(model.getUserName());
043                    soapModel.setCreateDate(model.getCreateDate());
044                    soapModel.setModifiedDate(model.getModifiedDate());
045                    soapModel.setClassNameId(model.getClassNameId());
046                    soapModel.setClassPK(model.getClassPK());
047                    soapModel.setName(model.getName());
048                    soapModel.setTitle(model.getTitle());
049                    soapModel.setDescription(model.getDescription());
050                    soapModel.setType(model.getType());
051                    soapModel.setSubtype(model.getSubtype());
052    
053                    return soapModel;
054            }
055    
056            public static RoleSoap[] toSoapModels(Role[] models) {
057                    RoleSoap[] soapModels = new RoleSoap[models.length];
058    
059                    for (int i = 0; i < models.length; i++) {
060                            soapModels[i] = toSoapModel(models[i]);
061                    }
062    
063                    return soapModels;
064            }
065    
066            public static RoleSoap[][] toSoapModels(Role[][] models) {
067                    RoleSoap[][] soapModels = null;
068    
069                    if (models.length > 0) {
070                            soapModels = new RoleSoap[models.length][models[0].length];
071                    }
072                    else {
073                            soapModels = new RoleSoap[0][0];
074                    }
075    
076                    for (int i = 0; i < models.length; i++) {
077                            soapModels[i] = toSoapModels(models[i]);
078                    }
079    
080                    return soapModels;
081            }
082    
083            public static RoleSoap[] toSoapModels(List<Role> models) {
084                    List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
085    
086                    for (Role model : models) {
087                            soapModels.add(toSoapModel(model));
088                    }
089    
090                    return soapModels.toArray(new RoleSoap[soapModels.size()]);
091            }
092    
093            public RoleSoap() {
094            }
095    
096            public long getPrimaryKey() {
097                    return _roleId;
098            }
099    
100            public void setPrimaryKey(long pk) {
101                    setRoleId(pk);
102            }
103    
104            public long getMvccVersion() {
105                    return _mvccVersion;
106            }
107    
108            public void setMvccVersion(long mvccVersion) {
109                    _mvccVersion = mvccVersion;
110            }
111    
112            public String getUuid() {
113                    return _uuid;
114            }
115    
116            public void setUuid(String uuid) {
117                    _uuid = uuid;
118            }
119    
120            public long getRoleId() {
121                    return _roleId;
122            }
123    
124            public void setRoleId(long roleId) {
125                    _roleId = roleId;
126            }
127    
128            public long getCompanyId() {
129                    return _companyId;
130            }
131    
132            public void setCompanyId(long companyId) {
133                    _companyId = companyId;
134            }
135    
136            public long getUserId() {
137                    return _userId;
138            }
139    
140            public void setUserId(long userId) {
141                    _userId = userId;
142            }
143    
144            public String getUserName() {
145                    return _userName;
146            }
147    
148            public void setUserName(String userName) {
149                    _userName = userName;
150            }
151    
152            public Date getCreateDate() {
153                    return _createDate;
154            }
155    
156            public void setCreateDate(Date createDate) {
157                    _createDate = createDate;
158            }
159    
160            public Date getModifiedDate() {
161                    return _modifiedDate;
162            }
163    
164            public void setModifiedDate(Date modifiedDate) {
165                    _modifiedDate = modifiedDate;
166            }
167    
168            public long getClassNameId() {
169                    return _classNameId;
170            }
171    
172            public void setClassNameId(long classNameId) {
173                    _classNameId = classNameId;
174            }
175    
176            public long getClassPK() {
177                    return _classPK;
178            }
179    
180            public void setClassPK(long classPK) {
181                    _classPK = classPK;
182            }
183    
184            public String getName() {
185                    return _name;
186            }
187    
188            public void setName(String name) {
189                    _name = name;
190            }
191    
192            public String getTitle() {
193                    return _title;
194            }
195    
196            public void setTitle(String title) {
197                    _title = title;
198            }
199    
200            public String getDescription() {
201                    return _description;
202            }
203    
204            public void setDescription(String description) {
205                    _description = description;
206            }
207    
208            public int getType() {
209                    return _type;
210            }
211    
212            public void setType(int type) {
213                    _type = type;
214            }
215    
216            public String getSubtype() {
217                    return _subtype;
218            }
219    
220            public void setSubtype(String subtype) {
221                    _subtype = subtype;
222            }
223    
224            private long _mvccVersion;
225            private String _uuid;
226            private long _roleId;
227            private long _companyId;
228            private long _userId;
229            private String _userName;
230            private Date _createDate;
231            private Date _modifiedDate;
232            private long _classNameId;
233            private long _classPK;
234            private String _name;
235            private String _title;
236            private String _description;
237            private int _type;
238            private String _subtype;
239    }