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.List;
021    
022    /**
023     * <p>
024     * This class is used by
025     * {@link com.liferay.portal.service.http.UserGroupServiceSoap}.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       com.liferay.portal.service.http.UserGroupServiceSoap
030     * @generated
031     */
032    public class UserGroupSoap implements Serializable {
033            public static UserGroupSoap toSoapModel(UserGroup model) {
034                    UserGroupSoap soapModel = new UserGroupSoap();
035    
036                    soapModel.setUserGroupId(model.getUserGroupId());
037                    soapModel.setCompanyId(model.getCompanyId());
038                    soapModel.setParentUserGroupId(model.getParentUserGroupId());
039                    soapModel.setName(model.getName());
040                    soapModel.setDescription(model.getDescription());
041    
042                    return soapModel;
043            }
044    
045            public static UserGroupSoap[] toSoapModels(UserGroup[] models) {
046                    UserGroupSoap[] soapModels = new UserGroupSoap[models.length];
047    
048                    for (int i = 0; i < models.length; i++) {
049                            soapModels[i] = toSoapModel(models[i]);
050                    }
051    
052                    return soapModels;
053            }
054    
055            public static UserGroupSoap[][] toSoapModels(UserGroup[][] models) {
056                    UserGroupSoap[][] soapModels = null;
057    
058                    if (models.length > 0) {
059                            soapModels = new UserGroupSoap[models.length][models[0].length];
060                    }
061                    else {
062                            soapModels = new UserGroupSoap[0][0];
063                    }
064    
065                    for (int i = 0; i < models.length; i++) {
066                            soapModels[i] = toSoapModels(models[i]);
067                    }
068    
069                    return soapModels;
070            }
071    
072            public static UserGroupSoap[] toSoapModels(List<UserGroup> models) {
073                    List<UserGroupSoap> soapModels = new ArrayList<UserGroupSoap>(models.size());
074    
075                    for (UserGroup model : models) {
076                            soapModels.add(toSoapModel(model));
077                    }
078    
079                    return soapModels.toArray(new UserGroupSoap[soapModels.size()]);
080            }
081    
082            public UserGroupSoap() {
083            }
084    
085            public long getPrimaryKey() {
086                    return _userGroupId;
087            }
088    
089            public void setPrimaryKey(long pk) {
090                    setUserGroupId(pk);
091            }
092    
093            public long getUserGroupId() {
094                    return _userGroupId;
095            }
096    
097            public void setUserGroupId(long userGroupId) {
098                    _userGroupId = userGroupId;
099            }
100    
101            public long getCompanyId() {
102                    return _companyId;
103            }
104    
105            public void setCompanyId(long companyId) {
106                    _companyId = companyId;
107            }
108    
109            public long getParentUserGroupId() {
110                    return _parentUserGroupId;
111            }
112    
113            public void setParentUserGroupId(long parentUserGroupId) {
114                    _parentUserGroupId = parentUserGroupId;
115            }
116    
117            public String getName() {
118                    return _name;
119            }
120    
121            public void setName(String name) {
122                    _name = name;
123            }
124    
125            public String getDescription() {
126                    return _description;
127            }
128    
129            public void setDescription(String description) {
130                    _description = description;
131            }
132    
133            private long _userGroupId;
134            private long _companyId;
135            private long _parentUserGroupId;
136            private String _name;
137            private String _description;
138    }