001
014
015 package com.liferay.portlet.messageboards.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class MBDiscussionWrapper implements MBDiscussion,
033 ModelWrapper<MBDiscussion> {
034 public MBDiscussionWrapper(MBDiscussion mbDiscussion) {
035 _mbDiscussion = mbDiscussion;
036 }
037
038 public Class<?> getModelClass() {
039 return MBDiscussion.class;
040 }
041
042 public String getModelClassName() {
043 return MBDiscussion.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("discussionId", getDiscussionId());
050 attributes.put("classNameId", getClassNameId());
051 attributes.put("classPK", getClassPK());
052 attributes.put("threadId", getThreadId());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long discussionId = (Long)attributes.get("discussionId");
059
060 if (discussionId != null) {
061 setDiscussionId(discussionId);
062 }
063
064 Long classNameId = (Long)attributes.get("classNameId");
065
066 if (classNameId != null) {
067 setClassNameId(classNameId);
068 }
069
070 Long classPK = (Long)attributes.get("classPK");
071
072 if (classPK != null) {
073 setClassPK(classPK);
074 }
075
076 Long threadId = (Long)attributes.get("threadId");
077
078 if (threadId != null) {
079 setThreadId(threadId);
080 }
081 }
082
083
088 public long getPrimaryKey() {
089 return _mbDiscussion.getPrimaryKey();
090 }
091
092
097 public void setPrimaryKey(long primaryKey) {
098 _mbDiscussion.setPrimaryKey(primaryKey);
099 }
100
101
106 public long getDiscussionId() {
107 return _mbDiscussion.getDiscussionId();
108 }
109
110
115 public void setDiscussionId(long discussionId) {
116 _mbDiscussion.setDiscussionId(discussionId);
117 }
118
119
124 public java.lang.String getClassName() {
125 return _mbDiscussion.getClassName();
126 }
127
128 public void setClassName(java.lang.String className) {
129 _mbDiscussion.setClassName(className);
130 }
131
132
137 public long getClassNameId() {
138 return _mbDiscussion.getClassNameId();
139 }
140
141
146 public void setClassNameId(long classNameId) {
147 _mbDiscussion.setClassNameId(classNameId);
148 }
149
150
155 public long getClassPK() {
156 return _mbDiscussion.getClassPK();
157 }
158
159
164 public void setClassPK(long classPK) {
165 _mbDiscussion.setClassPK(classPK);
166 }
167
168
173 public long getThreadId() {
174 return _mbDiscussion.getThreadId();
175 }
176
177
182 public void setThreadId(long threadId) {
183 _mbDiscussion.setThreadId(threadId);
184 }
185
186 public boolean isNew() {
187 return _mbDiscussion.isNew();
188 }
189
190 public void setNew(boolean n) {
191 _mbDiscussion.setNew(n);
192 }
193
194 public boolean isCachedModel() {
195 return _mbDiscussion.isCachedModel();
196 }
197
198 public void setCachedModel(boolean cachedModel) {
199 _mbDiscussion.setCachedModel(cachedModel);
200 }
201
202 public boolean isEscapedModel() {
203 return _mbDiscussion.isEscapedModel();
204 }
205
206 public java.io.Serializable getPrimaryKeyObj() {
207 return _mbDiscussion.getPrimaryKeyObj();
208 }
209
210 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
211 _mbDiscussion.setPrimaryKeyObj(primaryKeyObj);
212 }
213
214 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
215 return _mbDiscussion.getExpandoBridge();
216 }
217
218 public void setExpandoBridgeAttributes(
219 com.liferay.portal.service.ServiceContext serviceContext) {
220 _mbDiscussion.setExpandoBridgeAttributes(serviceContext);
221 }
222
223 @Override
224 public java.lang.Object clone() {
225 return new MBDiscussionWrapper((MBDiscussion)_mbDiscussion.clone());
226 }
227
228 public int compareTo(
229 com.liferay.portlet.messageboards.model.MBDiscussion mbDiscussion) {
230 return _mbDiscussion.compareTo(mbDiscussion);
231 }
232
233 @Override
234 public int hashCode() {
235 return _mbDiscussion.hashCode();
236 }
237
238 public com.liferay.portal.model.CacheModel<com.liferay.portlet.messageboards.model.MBDiscussion> toCacheModel() {
239 return _mbDiscussion.toCacheModel();
240 }
241
242 public com.liferay.portlet.messageboards.model.MBDiscussion toEscapedModel() {
243 return new MBDiscussionWrapper(_mbDiscussion.toEscapedModel());
244 }
245
246 public com.liferay.portlet.messageboards.model.MBDiscussion toUnescapedModel() {
247 return new MBDiscussionWrapper(_mbDiscussion.toUnescapedModel());
248 }
249
250 @Override
251 public java.lang.String toString() {
252 return _mbDiscussion.toString();
253 }
254
255 public java.lang.String toXmlString() {
256 return _mbDiscussion.toXmlString();
257 }
258
259 public void persist()
260 throws com.liferay.portal.kernel.exception.SystemException {
261 _mbDiscussion.persist();
262 }
263
264 @Override
265 public boolean equals(Object obj) {
266 if (this == obj) {
267 return true;
268 }
269
270 if (!(obj instanceof MBDiscussionWrapper)) {
271 return false;
272 }
273
274 MBDiscussionWrapper mbDiscussionWrapper = (MBDiscussionWrapper)obj;
275
276 if (Validator.equals(_mbDiscussion, mbDiscussionWrapper._mbDiscussion)) {
277 return true;
278 }
279
280 return false;
281 }
282
283
286 public MBDiscussion getWrappedMBDiscussion() {
287 return _mbDiscussion;
288 }
289
290 public MBDiscussion getWrappedModel() {
291 return _mbDiscussion;
292 }
293
294 public void resetOriginalValues() {
295 _mbDiscussion.resetOriginalValues();
296 }
297
298 private MBDiscussion _mbDiscussion;
299 }