001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class TicketWrapper implements Ticket, ModelWrapper<Ticket> {
033 public TicketWrapper(Ticket ticket) {
034 _ticket = ticket;
035 }
036
037 public Class<?> getModelClass() {
038 return Ticket.class;
039 }
040
041 public String getModelClassName() {
042 return Ticket.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("ticketId", getTicketId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("createDate", getCreateDate());
051 attributes.put("classNameId", getClassNameId());
052 attributes.put("classPK", getClassPK());
053 attributes.put("key", getKey());
054 attributes.put("type", getType());
055 attributes.put("extraInfo", getExtraInfo());
056 attributes.put("expirationDate", getExpirationDate());
057
058 return attributes;
059 }
060
061 public void setModelAttributes(Map<String, Object> attributes) {
062 Long ticketId = (Long)attributes.get("ticketId");
063
064 if (ticketId != null) {
065 setTicketId(ticketId);
066 }
067
068 Long companyId = (Long)attributes.get("companyId");
069
070 if (companyId != null) {
071 setCompanyId(companyId);
072 }
073
074 Date createDate = (Date)attributes.get("createDate");
075
076 if (createDate != null) {
077 setCreateDate(createDate);
078 }
079
080 Long classNameId = (Long)attributes.get("classNameId");
081
082 if (classNameId != null) {
083 setClassNameId(classNameId);
084 }
085
086 Long classPK = (Long)attributes.get("classPK");
087
088 if (classPK != null) {
089 setClassPK(classPK);
090 }
091
092 String key = (String)attributes.get("key");
093
094 if (key != null) {
095 setKey(key);
096 }
097
098 Integer type = (Integer)attributes.get("type");
099
100 if (type != null) {
101 setType(type);
102 }
103
104 String extraInfo = (String)attributes.get("extraInfo");
105
106 if (extraInfo != null) {
107 setExtraInfo(extraInfo);
108 }
109
110 Date expirationDate = (Date)attributes.get("expirationDate");
111
112 if (expirationDate != null) {
113 setExpirationDate(expirationDate);
114 }
115 }
116
117
122 public long getPrimaryKey() {
123 return _ticket.getPrimaryKey();
124 }
125
126
131 public void setPrimaryKey(long primaryKey) {
132 _ticket.setPrimaryKey(primaryKey);
133 }
134
135
140 public long getTicketId() {
141 return _ticket.getTicketId();
142 }
143
144
149 public void setTicketId(long ticketId) {
150 _ticket.setTicketId(ticketId);
151 }
152
153
158 public long getCompanyId() {
159 return _ticket.getCompanyId();
160 }
161
162
167 public void setCompanyId(long companyId) {
168 _ticket.setCompanyId(companyId);
169 }
170
171
176 public java.util.Date getCreateDate() {
177 return _ticket.getCreateDate();
178 }
179
180
185 public void setCreateDate(java.util.Date createDate) {
186 _ticket.setCreateDate(createDate);
187 }
188
189
194 public java.lang.String getClassName() {
195 return _ticket.getClassName();
196 }
197
198 public void setClassName(java.lang.String className) {
199 _ticket.setClassName(className);
200 }
201
202
207 public long getClassNameId() {
208 return _ticket.getClassNameId();
209 }
210
211
216 public void setClassNameId(long classNameId) {
217 _ticket.setClassNameId(classNameId);
218 }
219
220
225 public long getClassPK() {
226 return _ticket.getClassPK();
227 }
228
229
234 public void setClassPK(long classPK) {
235 _ticket.setClassPK(classPK);
236 }
237
238
243 public java.lang.String getKey() {
244 return _ticket.getKey();
245 }
246
247
252 public void setKey(java.lang.String key) {
253 _ticket.setKey(key);
254 }
255
256
261 public int getType() {
262 return _ticket.getType();
263 }
264
265
270 public void setType(int type) {
271 _ticket.setType(type);
272 }
273
274
279 public java.lang.String getExtraInfo() {
280 return _ticket.getExtraInfo();
281 }
282
283
288 public void setExtraInfo(java.lang.String extraInfo) {
289 _ticket.setExtraInfo(extraInfo);
290 }
291
292
297 public java.util.Date getExpirationDate() {
298 return _ticket.getExpirationDate();
299 }
300
301
306 public void setExpirationDate(java.util.Date expirationDate) {
307 _ticket.setExpirationDate(expirationDate);
308 }
309
310 public boolean isNew() {
311 return _ticket.isNew();
312 }
313
314 public void setNew(boolean n) {
315 _ticket.setNew(n);
316 }
317
318 public boolean isCachedModel() {
319 return _ticket.isCachedModel();
320 }
321
322 public void setCachedModel(boolean cachedModel) {
323 _ticket.setCachedModel(cachedModel);
324 }
325
326 public boolean isEscapedModel() {
327 return _ticket.isEscapedModel();
328 }
329
330 public java.io.Serializable getPrimaryKeyObj() {
331 return _ticket.getPrimaryKeyObj();
332 }
333
334 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
335 _ticket.setPrimaryKeyObj(primaryKeyObj);
336 }
337
338 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
339 return _ticket.getExpandoBridge();
340 }
341
342 public void setExpandoBridgeAttributes(
343 com.liferay.portal.service.ServiceContext serviceContext) {
344 _ticket.setExpandoBridgeAttributes(serviceContext);
345 }
346
347 @Override
348 public java.lang.Object clone() {
349 return new TicketWrapper((Ticket)_ticket.clone());
350 }
351
352 public int compareTo(com.liferay.portal.model.Ticket ticket) {
353 return _ticket.compareTo(ticket);
354 }
355
356 @Override
357 public int hashCode() {
358 return _ticket.hashCode();
359 }
360
361 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Ticket> toCacheModel() {
362 return _ticket.toCacheModel();
363 }
364
365 public com.liferay.portal.model.Ticket toEscapedModel() {
366 return new TicketWrapper(_ticket.toEscapedModel());
367 }
368
369 public com.liferay.portal.model.Ticket toUnescapedModel() {
370 return new TicketWrapper(_ticket.toUnescapedModel());
371 }
372
373 @Override
374 public java.lang.String toString() {
375 return _ticket.toString();
376 }
377
378 public java.lang.String toXmlString() {
379 return _ticket.toXmlString();
380 }
381
382 public void persist()
383 throws com.liferay.portal.kernel.exception.SystemException {
384 _ticket.persist();
385 }
386
387 public boolean isExpired() {
388 return _ticket.isExpired();
389 }
390
391 @Override
392 public boolean equals(Object obj) {
393 if (this == obj) {
394 return true;
395 }
396
397 if (!(obj instanceof TicketWrapper)) {
398 return false;
399 }
400
401 TicketWrapper ticketWrapper = (TicketWrapper)obj;
402
403 if (Validator.equals(_ticket, ticketWrapper._ticket)) {
404 return true;
405 }
406
407 return false;
408 }
409
410
413 public Ticket getWrappedTicket() {
414 return _ticket;
415 }
416
417 public Ticket getWrappedModel() {
418 return _ticket;
419 }
420
421 public void resetOriginalValues() {
422 _ticket.resetOriginalValues();
423 }
424
425 private Ticket _ticket;
426 }