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