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, specifically {@link com.liferay.portal.service.http.RoleServiceSoap}.
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       com.liferay.portal.service.http.RoleServiceSoap
027     * @generated
028     */
029    public class RoleSoap implements Serializable {
030            public static RoleSoap toSoapModel(Role model) {
031                    RoleSoap soapModel = new RoleSoap();
032    
033                    soapModel.setRoleId(model.getRoleId());
034                    soapModel.setCompanyId(model.getCompanyId());
035                    soapModel.setClassNameId(model.getClassNameId());
036                    soapModel.setClassPK(model.getClassPK());
037                    soapModel.setName(model.getName());
038                    soapModel.setTitle(model.getTitle());
039                    soapModel.setDescription(model.getDescription());
040                    soapModel.setType(model.getType());
041                    soapModel.setSubtype(model.getSubtype());
042    
043                    return soapModel;
044            }
045    
046            public static RoleSoap[] toSoapModels(Role[] models) {
047                    RoleSoap[] soapModels = new RoleSoap[models.length];
048    
049                    for (int i = 0; i < models.length; i++) {
050                            soapModels[i] = toSoapModel(models[i]);
051                    }
052    
053                    return soapModels;
054            }
055    
056            public static RoleSoap[][] toSoapModels(Role[][] models) {
057                    RoleSoap[][] soapModels = null;
058    
059                    if (models.length > 0) {
060                            soapModels = new RoleSoap[models.length][models[0].length];
061                    }
062                    else {
063                            soapModels = new RoleSoap[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 RoleSoap[] toSoapModels(List<Role> models) {
074                    List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
075    
076                    for (Role model : models) {
077                            soapModels.add(toSoapModel(model));
078                    }
079    
080                    return soapModels.toArray(new RoleSoap[soapModels.size()]);
081            }
082    
083            public RoleSoap() {
084            }
085    
086            public long getPrimaryKey() {
087                    return _roleId;
088            }
089    
090            public void setPrimaryKey(long pk) {
091                    setRoleId(pk);
092            }
093    
094            public long getRoleId() {
095                    return _roleId;
096            }
097    
098            public void setRoleId(long roleId) {
099                    _roleId = roleId;
100            }
101    
102            public long getCompanyId() {
103                    return _companyId;
104            }
105    
106            public void setCompanyId(long companyId) {
107                    _companyId = companyId;
108            }
109    
110            public long getClassNameId() {
111                    return _classNameId;
112            }
113    
114            public void setClassNameId(long classNameId) {
115                    _classNameId = classNameId;
116            }
117    
118            public long getClassPK() {
119                    return _classPK;
120            }
121    
122            public void setClassPK(long classPK) {
123                    _classPK = classPK;
124            }
125    
126            public String getName() {
127                    return _name;
128            }
129    
130            public void setName(String name) {
131                    _name = name;
132            }
133    
134            public String getTitle() {
135                    return _title;
136            }
137    
138            public void setTitle(String title) {
139                    _title = title;
140            }
141    
142            public String getDescription() {
143                    return _description;
144            }
145    
146            public void setDescription(String description) {
147                    _description = description;
148            }
149    
150            public int getType() {
151                    return _type;
152            }
153    
154            public void setType(int type) {
155                    _type = type;
156            }
157    
158            public String getSubtype() {
159                    return _subtype;
160            }
161    
162            public void setSubtype(String subtype) {
163                    _subtype = subtype;
164            }
165    
166            private long _roleId;
167            private long _companyId;
168            private long _classNameId;
169            private long _classPK;
170            private String _name;
171            private String _title;
172            private String _description;
173            private int _type;
174            private String _subtype;
175    }