1
22
23 package com.liferay.portlet.messageboards.model;
24
25 import java.io.Serializable;
26
27 import java.util.ArrayList;
28 import java.util.Date;
29 import java.util.List;
30
31
49 public class MBThreadSoap implements Serializable {
50 public static MBThreadSoap toSoapModel(MBThread model) {
51 MBThreadSoap soapModel = new MBThreadSoap();
52
53 soapModel.setThreadId(model.getThreadId());
54 soapModel.setCategoryId(model.getCategoryId());
55 soapModel.setRootMessageId(model.getRootMessageId());
56 soapModel.setMessageCount(model.getMessageCount());
57 soapModel.setViewCount(model.getViewCount());
58 soapModel.setLastPostByUserId(model.getLastPostByUserId());
59 soapModel.setLastPostDate(model.getLastPostDate());
60 soapModel.setPriority(model.getPriority());
61
62 return soapModel;
63 }
64
65 public static MBThreadSoap[] toSoapModels(List<MBThread> models) {
66 List<MBThreadSoap> soapModels = new ArrayList<MBThreadSoap>(models.size());
67
68 for (MBThread model : models) {
69 soapModels.add(toSoapModel(model));
70 }
71
72 return soapModels.toArray(new MBThreadSoap[soapModels.size()]);
73 }
74
75 public MBThreadSoap() {
76 }
77
78 public long getPrimaryKey() {
79 return _threadId;
80 }
81
82 public void setPrimaryKey(long pk) {
83 setThreadId(pk);
84 }
85
86 public long getThreadId() {
87 return _threadId;
88 }
89
90 public void setThreadId(long threadId) {
91 _threadId = threadId;
92 }
93
94 public long getCategoryId() {
95 return _categoryId;
96 }
97
98 public void setCategoryId(long categoryId) {
99 _categoryId = categoryId;
100 }
101
102 public long getRootMessageId() {
103 return _rootMessageId;
104 }
105
106 public void setRootMessageId(long rootMessageId) {
107 _rootMessageId = rootMessageId;
108 }
109
110 public int getMessageCount() {
111 return _messageCount;
112 }
113
114 public void setMessageCount(int messageCount) {
115 _messageCount = messageCount;
116 }
117
118 public int getViewCount() {
119 return _viewCount;
120 }
121
122 public void setViewCount(int viewCount) {
123 _viewCount = viewCount;
124 }
125
126 public long getLastPostByUserId() {
127 return _lastPostByUserId;
128 }
129
130 public void setLastPostByUserId(long lastPostByUserId) {
131 _lastPostByUserId = lastPostByUserId;
132 }
133
134 public Date getLastPostDate() {
135 return _lastPostDate;
136 }
137
138 public void setLastPostDate(Date lastPostDate) {
139 _lastPostDate = lastPostDate;
140 }
141
142 public double getPriority() {
143 return _priority;
144 }
145
146 public void setPriority(double priority) {
147 _priority = priority;
148 }
149
150 private long _threadId;
151 private long _categoryId;
152 private long _rootMessageId;
153 private int _messageCount;
154 private int _viewCount;
155 private long _lastPostByUserId;
156 private Date _lastPostDate;
157 private double _priority;
158 }