001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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     * This class is used by SOAP remote services, specifically {@link com.liferay.portlet.messageboards.service.http.MBMessageFlagServiceSoap}.
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       com.liferay.portlet.messageboards.service.http.MBMessageFlagServiceSoap
028     * @generated
029     */
030    public class MBMessageFlagSoap implements Serializable {
031            public static MBMessageFlagSoap toSoapModel(MBMessageFlag model) {
032                    MBMessageFlagSoap soapModel = new MBMessageFlagSoap();
033    
034                    soapModel.setMessageFlagId(model.getMessageFlagId());
035                    soapModel.setUserId(model.getUserId());
036                    soapModel.setModifiedDate(model.getModifiedDate());
037                    soapModel.setThreadId(model.getThreadId());
038                    soapModel.setMessageId(model.getMessageId());
039                    soapModel.setFlag(model.getFlag());
040    
041                    return soapModel;
042            }
043    
044            public static MBMessageFlagSoap[] toSoapModels(MBMessageFlag[] models) {
045                    MBMessageFlagSoap[] soapModels = new MBMessageFlagSoap[models.length];
046    
047                    for (int i = 0; i < models.length; i++) {
048                            soapModels[i] = toSoapModel(models[i]);
049                    }
050    
051                    return soapModels;
052            }
053    
054            public static MBMessageFlagSoap[][] toSoapModels(MBMessageFlag[][] models) {
055                    MBMessageFlagSoap[][] soapModels = null;
056    
057                    if (models.length > 0) {
058                            soapModels = new MBMessageFlagSoap[models.length][models[0].length];
059                    }
060                    else {
061                            soapModels = new MBMessageFlagSoap[0][0];
062                    }
063    
064                    for (int i = 0; i < models.length; i++) {
065                            soapModels[i] = toSoapModels(models[i]);
066                    }
067    
068                    return soapModels;
069            }
070    
071            public static MBMessageFlagSoap[] toSoapModels(List<MBMessageFlag> models) {
072                    List<MBMessageFlagSoap> soapModels = new ArrayList<MBMessageFlagSoap>(models.size());
073    
074                    for (MBMessageFlag model : models) {
075                            soapModels.add(toSoapModel(model));
076                    }
077    
078                    return soapModels.toArray(new MBMessageFlagSoap[soapModels.size()]);
079            }
080    
081            public MBMessageFlagSoap() {
082            }
083    
084            public long getPrimaryKey() {
085                    return _messageFlagId;
086            }
087    
088            public void setPrimaryKey(long pk) {
089                    setMessageFlagId(pk);
090            }
091    
092            public long getMessageFlagId() {
093                    return _messageFlagId;
094            }
095    
096            public void setMessageFlagId(long messageFlagId) {
097                    _messageFlagId = messageFlagId;
098            }
099    
100            public long getUserId() {
101                    return _userId;
102            }
103    
104            public void setUserId(long userId) {
105                    _userId = userId;
106            }
107    
108            public Date getModifiedDate() {
109                    return _modifiedDate;
110            }
111    
112            public void setModifiedDate(Date modifiedDate) {
113                    _modifiedDate = modifiedDate;
114            }
115    
116            public long getThreadId() {
117                    return _threadId;
118            }
119    
120            public void setThreadId(long threadId) {
121                    _threadId = threadId;
122            }
123    
124            public long getMessageId() {
125                    return _messageId;
126            }
127    
128            public void setMessageId(long messageId) {
129                    _messageId = messageId;
130            }
131    
132            public int getFlag() {
133                    return _flag;
134            }
135    
136            public void setFlag(int flag) {
137                    _flag = flag;
138            }
139    
140            private long _messageFlagId;
141            private long _userId;
142            private Date _modifiedDate;
143            private long _threadId;
144            private long _messageId;
145            private int _flag;
146    }