001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020
021 import java.util.Date;
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class TicketWrapper implements Ticket, ModelWrapper<Ticket> {
036 public TicketWrapper(Ticket ticket) {
037 _ticket = ticket;
038 }
039
040 @Override
041 public Class<?> getModelClass() {
042 return Ticket.class;
043 }
044
045 @Override
046 public String getModelClassName() {
047 return Ticket.class.getName();
048 }
049
050 @Override
051 public Map<String, Object> getModelAttributes() {
052 Map<String, Object> attributes = new HashMap<String, Object>();
053
054 attributes.put("ticketId", getTicketId());
055 attributes.put("companyId", getCompanyId());
056 attributes.put("createDate", getCreateDate());
057 attributes.put("classNameId", getClassNameId());
058 attributes.put("classPK", getClassPK());
059 attributes.put("key", getKey());
060 attributes.put("type", getType());
061 attributes.put("extraInfo", getExtraInfo());
062 attributes.put("expirationDate", getExpirationDate());
063
064 return attributes;
065 }
066
067 @Override
068 public void setModelAttributes(Map<String, Object> attributes) {
069 Long ticketId = (Long)attributes.get("ticketId");
070
071 if (ticketId != null) {
072 setTicketId(ticketId);
073 }
074
075 Long companyId = (Long)attributes.get("companyId");
076
077 if (companyId != null) {
078 setCompanyId(companyId);
079 }
080
081 Date createDate = (Date)attributes.get("createDate");
082
083 if (createDate != null) {
084 setCreateDate(createDate);
085 }
086
087 Long classNameId = (Long)attributes.get("classNameId");
088
089 if (classNameId != null) {
090 setClassNameId(classNameId);
091 }
092
093 Long classPK = (Long)attributes.get("classPK");
094
095 if (classPK != null) {
096 setClassPK(classPK);
097 }
098
099 String key = (String)attributes.get("key");
100
101 if (key != null) {
102 setKey(key);
103 }
104
105 Integer type = (Integer)attributes.get("type");
106
107 if (type != null) {
108 setType(type);
109 }
110
111 String extraInfo = (String)attributes.get("extraInfo");
112
113 if (extraInfo != null) {
114 setExtraInfo(extraInfo);
115 }
116
117 Date expirationDate = (Date)attributes.get("expirationDate");
118
119 if (expirationDate != null) {
120 setExpirationDate(expirationDate);
121 }
122 }
123
124
129 @Override
130 public long getPrimaryKey() {
131 return _ticket.getPrimaryKey();
132 }
133
134
139 @Override
140 public void setPrimaryKey(long primaryKey) {
141 _ticket.setPrimaryKey(primaryKey);
142 }
143
144
149 @Override
150 public long getTicketId() {
151 return _ticket.getTicketId();
152 }
153
154
159 @Override
160 public void setTicketId(long ticketId) {
161 _ticket.setTicketId(ticketId);
162 }
163
164
169 @Override
170 public long getCompanyId() {
171 return _ticket.getCompanyId();
172 }
173
174
179 @Override
180 public void setCompanyId(long companyId) {
181 _ticket.setCompanyId(companyId);
182 }
183
184
189 @Override
190 public java.util.Date getCreateDate() {
191 return _ticket.getCreateDate();
192 }
193
194
199 @Override
200 public void setCreateDate(java.util.Date createDate) {
201 _ticket.setCreateDate(createDate);
202 }
203
204
209 @Override
210 public java.lang.String getClassName() {
211 return _ticket.getClassName();
212 }
213
214 @Override
215 public void setClassName(java.lang.String className) {
216 _ticket.setClassName(className);
217 }
218
219
224 @Override
225 public long getClassNameId() {
226 return _ticket.getClassNameId();
227 }
228
229
234 @Override
235 public void setClassNameId(long classNameId) {
236 _ticket.setClassNameId(classNameId);
237 }
238
239
244 @Override
245 public long getClassPK() {
246 return _ticket.getClassPK();
247 }
248
249
254 @Override
255 public void setClassPK(long classPK) {
256 _ticket.setClassPK(classPK);
257 }
258
259
264 @Override
265 public java.lang.String getKey() {
266 return _ticket.getKey();
267 }
268
269
274 @Override
275 public void setKey(java.lang.String key) {
276 _ticket.setKey(key);
277 }
278
279
284 @Override
285 public int getType() {
286 return _ticket.getType();
287 }
288
289
294 @Override
295 public void setType(int type) {
296 _ticket.setType(type);
297 }
298
299
304 @Override
305 public java.lang.String getExtraInfo() {
306 return _ticket.getExtraInfo();
307 }
308
309
314 @Override
315 public void setExtraInfo(java.lang.String extraInfo) {
316 _ticket.setExtraInfo(extraInfo);
317 }
318
319
324 @Override
325 public java.util.Date getExpirationDate() {
326 return _ticket.getExpirationDate();
327 }
328
329
334 @Override
335 public void setExpirationDate(java.util.Date expirationDate) {
336 _ticket.setExpirationDate(expirationDate);
337 }
338
339 @Override
340 public boolean isNew() {
341 return _ticket.isNew();
342 }
343
344 @Override
345 public void setNew(boolean n) {
346 _ticket.setNew(n);
347 }
348
349 @Override
350 public boolean isCachedModel() {
351 return _ticket.isCachedModel();
352 }
353
354 @Override
355 public void setCachedModel(boolean cachedModel) {
356 _ticket.setCachedModel(cachedModel);
357 }
358
359 @Override
360 public boolean isEscapedModel() {
361 return _ticket.isEscapedModel();
362 }
363
364 @Override
365 public java.io.Serializable getPrimaryKeyObj() {
366 return _ticket.getPrimaryKeyObj();
367 }
368
369 @Override
370 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
371 _ticket.setPrimaryKeyObj(primaryKeyObj);
372 }
373
374 @Override
375 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
376 return _ticket.getExpandoBridge();
377 }
378
379 @Override
380 public void setExpandoBridgeAttributes(
381 com.liferay.portal.model.BaseModel<?> baseModel) {
382 _ticket.setExpandoBridgeAttributes(baseModel);
383 }
384
385 @Override
386 public void setExpandoBridgeAttributes(
387 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
388 _ticket.setExpandoBridgeAttributes(expandoBridge);
389 }
390
391 @Override
392 public void setExpandoBridgeAttributes(
393 com.liferay.portal.service.ServiceContext serviceContext) {
394 _ticket.setExpandoBridgeAttributes(serviceContext);
395 }
396
397 @Override
398 public java.lang.Object clone() {
399 return new TicketWrapper((Ticket)_ticket.clone());
400 }
401
402 @Override
403 public int compareTo(com.liferay.portal.model.Ticket ticket) {
404 return _ticket.compareTo(ticket);
405 }
406
407 @Override
408 public int hashCode() {
409 return _ticket.hashCode();
410 }
411
412 @Override
413 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Ticket> toCacheModel() {
414 return _ticket.toCacheModel();
415 }
416
417 @Override
418 public com.liferay.portal.model.Ticket toEscapedModel() {
419 return new TicketWrapper(_ticket.toEscapedModel());
420 }
421
422 @Override
423 public com.liferay.portal.model.Ticket toUnescapedModel() {
424 return new TicketWrapper(_ticket.toUnescapedModel());
425 }
426
427 @Override
428 public java.lang.String toString() {
429 return _ticket.toString();
430 }
431
432 @Override
433 public java.lang.String toXmlString() {
434 return _ticket.toXmlString();
435 }
436
437 @Override
438 public void persist()
439 throws com.liferay.portal.kernel.exception.SystemException {
440 _ticket.persist();
441 }
442
443 @Override
444 public boolean isExpired() {
445 return _ticket.isExpired();
446 }
447
448 @Override
449 public boolean equals(Object obj) {
450 if (this == obj) {
451 return true;
452 }
453
454 if (!(obj instanceof TicketWrapper)) {
455 return false;
456 }
457
458 TicketWrapper ticketWrapper = (TicketWrapper)obj;
459
460 if (Validator.equals(_ticket, ticketWrapper._ticket)) {
461 return true;
462 }
463
464 return false;
465 }
466
467
470 public Ticket getWrappedTicket() {
471 return _ticket;
472 }
473
474 @Override
475 public Ticket getWrappedModel() {
476 return _ticket;
477 }
478
479 @Override
480 public void resetOriginalValues() {
481 _ticket.resetOriginalValues();
482 }
483
484 private Ticket _ticket;
485 }