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.portlet.announcements.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * <p>
025     * This class is used by
026     * {@link com.liferay.portlet.announcements.service.http.AnnouncementsFlagServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portlet.announcements.service.http.AnnouncementsFlagServiceSoap
031     * @generated
032     */
033    public class AnnouncementsFlagSoap implements Serializable {
034            public static AnnouncementsFlagSoap toSoapModel(AnnouncementsFlag model) {
035                    AnnouncementsFlagSoap soapModel = new AnnouncementsFlagSoap();
036    
037                    soapModel.setFlagId(model.getFlagId());
038                    soapModel.setUserId(model.getUserId());
039                    soapModel.setCreateDate(model.getCreateDate());
040                    soapModel.setEntryId(model.getEntryId());
041                    soapModel.setValue(model.getValue());
042    
043                    return soapModel;
044            }
045    
046            public static AnnouncementsFlagSoap[] toSoapModels(
047                    AnnouncementsFlag[] models) {
048                    AnnouncementsFlagSoap[] soapModels = new AnnouncementsFlagSoap[models.length];
049    
050                    for (int i = 0; i < models.length; i++) {
051                            soapModels[i] = toSoapModel(models[i]);
052                    }
053    
054                    return soapModels;
055            }
056    
057            public static AnnouncementsFlagSoap[][] toSoapModels(
058                    AnnouncementsFlag[][] models) {
059                    AnnouncementsFlagSoap[][] soapModels = null;
060    
061                    if (models.length > 0) {
062                            soapModels = new AnnouncementsFlagSoap[models.length][models[0].length];
063                    }
064                    else {
065                            soapModels = new AnnouncementsFlagSoap[0][0];
066                    }
067    
068                    for (int i = 0; i < models.length; i++) {
069                            soapModels[i] = toSoapModels(models[i]);
070                    }
071    
072                    return soapModels;
073            }
074    
075            public static AnnouncementsFlagSoap[] toSoapModels(
076                    List<AnnouncementsFlag> models) {
077                    List<AnnouncementsFlagSoap> soapModels = new ArrayList<AnnouncementsFlagSoap>(models.size());
078    
079                    for (AnnouncementsFlag model : models) {
080                            soapModels.add(toSoapModel(model));
081                    }
082    
083                    return soapModels.toArray(new AnnouncementsFlagSoap[soapModels.size()]);
084            }
085    
086            public AnnouncementsFlagSoap() {
087            }
088    
089            public long getPrimaryKey() {
090                    return _flagId;
091            }
092    
093            public void setPrimaryKey(long pk) {
094                    setFlagId(pk);
095            }
096    
097            public long getFlagId() {
098                    return _flagId;
099            }
100    
101            public void setFlagId(long flagId) {
102                    _flagId = flagId;
103            }
104    
105            public long getUserId() {
106                    return _userId;
107            }
108    
109            public void setUserId(long userId) {
110                    _userId = userId;
111            }
112    
113            public Date getCreateDate() {
114                    return _createDate;
115            }
116    
117            public void setCreateDate(Date createDate) {
118                    _createDate = createDate;
119            }
120    
121            public long getEntryId() {
122                    return _entryId;
123            }
124    
125            public void setEntryId(long entryId) {
126                    _entryId = entryId;
127            }
128    
129            public int getValue() {
130                    return _value;
131            }
132    
133            public void setValue(int value) {
134                    _value = value;
135            }
136    
137            private long _flagId;
138            private long _userId;
139            private Date _createDate;
140            private long _entryId;
141            private int _value;
142    }