001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.model;
022:
023: import com.liferay.portal.service.persistence.OrgGroupPermissionPK;
024:
025: import java.io.Serializable;
026:
027: import java.util.ArrayList;
028: import java.util.List;
029:
030: /**
031: * <a href="OrgGroupPermissionSoap.java.html"><b><i>View Source</i></b></a>
032: *
033: * <p>
034: * ServiceBuilder generated this class. Modifications in this class will be
035: * overwritten the next time is generated.
036: * </p>
037: *
038: * <p>
039: * This class is used by
040: * <code>com.liferay.portal.service.http.OrgGroupPermissionServiceSoap</code>.
041: * </p>
042: *
043: * @author Brian Wing Shun Chan
044: *
045: * @see com.liferay.portal.service.http.OrgGroupPermissionServiceSoap
046: *
047: */
048: public class OrgGroupPermissionSoap implements Serializable {
049: public static OrgGroupPermissionSoap toSoapModel(
050: OrgGroupPermission model) {
051: OrgGroupPermissionSoap soapModel = new OrgGroupPermissionSoap();
052:
053: soapModel.setOrganizationId(model.getOrganizationId());
054: soapModel.setGroupId(model.getGroupId());
055: soapModel.setPermissionId(model.getPermissionId());
056:
057: return soapModel;
058: }
059:
060: public static OrgGroupPermissionSoap[] toSoapModels(List models) {
061: List soapModels = new ArrayList(models.size());
062:
063: for (int i = 0; i < models.size(); i++) {
064: OrgGroupPermission model = (OrgGroupPermission) models
065: .get(i);
066:
067: soapModels.add(toSoapModel(model));
068: }
069:
070: return (OrgGroupPermissionSoap[]) soapModels
071: .toArray(new OrgGroupPermissionSoap[0]);
072: }
073:
074: public OrgGroupPermissionSoap() {
075: }
076:
077: public OrgGroupPermissionPK getPrimaryKey() {
078: return new OrgGroupPermissionPK(_organizationId, _groupId,
079: _permissionId);
080: }
081:
082: public void setPrimaryKey(OrgGroupPermissionPK pk) {
083: setOrganizationId(pk.organizationId);
084: setGroupId(pk.groupId);
085: setPermissionId(pk.permissionId);
086: }
087:
088: public long getOrganizationId() {
089: return _organizationId;
090: }
091:
092: public void setOrganizationId(long organizationId) {
093: _organizationId = organizationId;
094: }
095:
096: public long getGroupId() {
097: return _groupId;
098: }
099:
100: public void setGroupId(long groupId) {
101: _groupId = groupId;
102: }
103:
104: public long getPermissionId() {
105: return _permissionId;
106: }
107:
108: public void setPermissionId(long permissionId) {
109: _permissionId = permissionId;
110: }
111:
112: private long _organizationId;
113: private long _groupId;
114: private long _permissionId;
115: }
|