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