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.messageboards.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.messageboards.service.http.MBMessageFlagServiceSoap}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       com.liferay.portlet.messageboards.service.http.MBMessageFlagServiceSoap
031     * @generated
032     */
033    public class MBMessageFlagSoap implements Serializable {
034            public static MBMessageFlagSoap toSoapModel(MBMessageFlag model) {
035                    MBMessageFlagSoap soapModel = new MBMessageFlagSoap();
036    
037                    soapModel.setMessageFlagId(model.getMessageFlagId());
038                    soapModel.setUserId(model.getUserId());
039                    soapModel.setModifiedDate(model.getModifiedDate());
040                    soapModel.setThreadId(model.getThreadId());
041                    soapModel.setMessageId(model.getMessageId());
042                    soapModel.setFlag(model.getFlag());
043    
044                    return soapModel;
045            }
046    
047            public static MBMessageFlagSoap[] toSoapModels(MBMessageFlag[] models) {
048                    MBMessageFlagSoap[] soapModels = new MBMessageFlagSoap[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 MBMessageFlagSoap[][] toSoapModels(MBMessageFlag[][] models) {
058                    MBMessageFlagSoap[][] soapModels = null;
059    
060                    if (models.length > 0) {
061                            soapModels = new MBMessageFlagSoap[models.length][models[0].length];
062                    }
063                    else {
064                            soapModels = new MBMessageFlagSoap[0][0];
065                    }
066    
067                    for (int i = 0; i < models.length; i++) {
068                            soapModels[i] = toSoapModels(models[i]);
069                    }
070    
071                    return soapModels;
072            }
073    
074            public static MBMessageFlagSoap[] toSoapModels(List<MBMessageFlag> models) {
075                    List<MBMessageFlagSoap> soapModels = new ArrayList<MBMessageFlagSoap>(models.size());
076    
077                    for (MBMessageFlag model : models) {
078                            soapModels.add(toSoapModel(model));
079                    }
080    
081                    return soapModels.toArray(new MBMessageFlagSoap[soapModels.size()]);
082            }
083    
084            public MBMessageFlagSoap() {
085            }
086    
087            public long getPrimaryKey() {
088                    return _messageFlagId;
089            }
090    
091            public void setPrimaryKey(long pk) {
092                    setMessageFlagId(pk);
093            }
094    
095            public long getMessageFlagId() {
096                    return _messageFlagId;
097            }
098    
099            public void setMessageFlagId(long messageFlagId) {
100                    _messageFlagId = messageFlagId;
101            }
102    
103            public long getUserId() {
104                    return _userId;
105            }
106    
107            public void setUserId(long userId) {
108                    _userId = userId;
109            }
110    
111            public Date getModifiedDate() {
112                    return _modifiedDate;
113            }
114    
115            public void setModifiedDate(Date modifiedDate) {
116                    _modifiedDate = modifiedDate;
117            }
118    
119            public long getThreadId() {
120                    return _threadId;
121            }
122    
123            public void setThreadId(long threadId) {
124                    _threadId = threadId;
125            }
126    
127            public long getMessageId() {
128                    return _messageId;
129            }
130    
131            public void setMessageId(long messageId) {
132                    _messageId = messageId;
133            }
134    
135            public int getFlag() {
136                    return _flag;
137            }
138    
139            public void setFlag(int flag) {
140                    _flag = flag;
141            }
142    
143            private long _messageFlagId;
144            private long _userId;
145            private Date _modifiedDate;
146            private long _threadId;
147            private long _messageId;
148            private int _flag;
149    }