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