001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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     * <p>
024     * This class is used by
025     * {@link com.liferay.portal.service.http.RoleServiceSoap}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       com.liferay.portal.service.http.RoleServiceSoap
030     * @generated
031     */
032    public class RoleSoap implements Serializable {
033            public static RoleSoap toSoapModel(Role model) {
034                    RoleSoap soapModel = new RoleSoap();
035    
036                    soapModel.setRoleId(model.getRoleId());
037                    soapModel.setCompanyId(model.getCompanyId());
038                    soapModel.setClassNameId(model.getClassNameId());
039                    soapModel.setClassPK(model.getClassPK());
040                    soapModel.setName(model.getName());
041                    soapModel.setTitle(model.getTitle());
042                    soapModel.setDescription(model.getDescription());
043                    soapModel.setType(model.getType());
044                    soapModel.setSubtype(model.getSubtype());
045    
046                    return soapModel;
047            }
048    
049            public static RoleSoap[] toSoapModels(Role[] models) {
050                    RoleSoap[] soapModels = new RoleSoap[models.length];
051    
052                    for (int i = 0; i < models.length; i++) {
053                            soapModels[i] = toSoapModel(models[i]);
054                    }
055    
056                    return soapModels;
057            }
058    
059            public static RoleSoap[][] toSoapModels(Role[][] models) {
060                    RoleSoap[][] soapModels = null;
061    
062                    if (models.length > 0) {
063                            soapModels = new RoleSoap[models.length][models[0].length];
064                    }
065                    else {
066                            soapModels = new RoleSoap[0][0];
067                    }
068    
069                    for (int i = 0; i < models.length; i++) {
070                            soapModels[i] = toSoapModels(models[i]);
071                    }
072    
073                    return soapModels;
074            }
075    
076            public static RoleSoap[] toSoapModels(List<Role> models) {
077                    List<RoleSoap> soapModels = new ArrayList<RoleSoap>(models.size());
078    
079                    for (Role model : models) {
080                            soapModels.add(toSoapModel(model));
081                    }
082    
083                    return soapModels.toArray(new RoleSoap[soapModels.size()]);
084            }
085    
086            public RoleSoap() {
087            }
088    
089            public long getPrimaryKey() {
090                    return _roleId;
091            }
092    
093            public void setPrimaryKey(long pk) {
094                    setRoleId(pk);
095            }
096    
097            public long getRoleId() {
098                    return _roleId;
099            }
100    
101            public void setRoleId(long roleId) {
102                    _roleId = roleId;
103            }
104    
105            public long getCompanyId() {
106                    return _companyId;
107            }
108    
109            public void setCompanyId(long companyId) {
110                    _companyId = companyId;
111            }
112    
113            public long getClassNameId() {
114                    return _classNameId;
115            }
116    
117            public void setClassNameId(long classNameId) {
118                    _classNameId = classNameId;
119            }
120    
121            public long getClassPK() {
122                    return _classPK;
123            }
124    
125            public void setClassPK(long classPK) {
126                    _classPK = classPK;
127            }
128    
129            public String getName() {
130                    return _name;
131            }
132    
133            public void setName(String name) {
134                    _name = name;
135            }
136    
137            public String getTitle() {
138                    return _title;
139            }
140    
141            public void setTitle(String title) {
142                    _title = title;
143            }
144    
145            public String getDescription() {
146                    return _description;
147            }
148    
149            public void setDescription(String description) {
150                    _description = description;
151            }
152    
153            public int getType() {
154                    return _type;
155            }
156    
157            public void setType(int type) {
158                    _type = type;
159            }
160    
161            public String getSubtype() {
162                    return _subtype;
163            }
164    
165            public void setSubtype(String subtype) {
166                    _subtype = subtype;
167            }
168    
169            private long _roleId;
170            private long _companyId;
171            private long _classNameId;
172            private long _classPK;
173            private String _name;
174            private String _title;
175            private String _description;
176            private int _type;
177            private String _subtype;
178    }