001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import java.util.Date;
018    import java.util.HashMap;
019    import java.util.Map;
020    
021    /**
022     * <p>
023     * This class is a wrapper for {@link Ticket}.
024     * </p>
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       Ticket
028     * @generated
029     */
030    public class TicketWrapper implements Ticket, ModelWrapper<Ticket> {
031            public TicketWrapper(Ticket ticket) {
032                    _ticket = ticket;
033            }
034    
035            public Class<?> getModelClass() {
036                    return Ticket.class;
037            }
038    
039            public String getModelClassName() {
040                    return Ticket.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("ticketId", getTicketId());
047                    attributes.put("companyId", getCompanyId());
048                    attributes.put("createDate", getCreateDate());
049                    attributes.put("classNameId", getClassNameId());
050                    attributes.put("classPK", getClassPK());
051                    attributes.put("key", getKey());
052                    attributes.put("type", getType());
053                    attributes.put("extraInfo", getExtraInfo());
054                    attributes.put("expirationDate", getExpirationDate());
055    
056                    return attributes;
057            }
058    
059            public void setModelAttributes(Map<String, Object> attributes) {
060                    Long ticketId = (Long)attributes.get("ticketId");
061    
062                    if (ticketId != null) {
063                            setTicketId(ticketId);
064                    }
065    
066                    Long companyId = (Long)attributes.get("companyId");
067    
068                    if (companyId != null) {
069                            setCompanyId(companyId);
070                    }
071    
072                    Date createDate = (Date)attributes.get("createDate");
073    
074                    if (createDate != null) {
075                            setCreateDate(createDate);
076                    }
077    
078                    Long classNameId = (Long)attributes.get("classNameId");
079    
080                    if (classNameId != null) {
081                            setClassNameId(classNameId);
082                    }
083    
084                    Long classPK = (Long)attributes.get("classPK");
085    
086                    if (classPK != null) {
087                            setClassPK(classPK);
088                    }
089    
090                    String key = (String)attributes.get("key");
091    
092                    if (key != null) {
093                            setKey(key);
094                    }
095    
096                    Integer type = (Integer)attributes.get("type");
097    
098                    if (type != null) {
099                            setType(type);
100                    }
101    
102                    String extraInfo = (String)attributes.get("extraInfo");
103    
104                    if (extraInfo != null) {
105                            setExtraInfo(extraInfo);
106                    }
107    
108                    Date expirationDate = (Date)attributes.get("expirationDate");
109    
110                    if (expirationDate != null) {
111                            setExpirationDate(expirationDate);
112                    }
113            }
114    
115            /**
116            * Returns the primary key of this ticket.
117            *
118            * @return the primary key of this ticket
119            */
120            public long getPrimaryKey() {
121                    return _ticket.getPrimaryKey();
122            }
123    
124            /**
125            * Sets the primary key of this ticket.
126            *
127            * @param primaryKey the primary key of this ticket
128            */
129            public void setPrimaryKey(long primaryKey) {
130                    _ticket.setPrimaryKey(primaryKey);
131            }
132    
133            /**
134            * Returns the ticket ID of this ticket.
135            *
136            * @return the ticket ID of this ticket
137            */
138            public long getTicketId() {
139                    return _ticket.getTicketId();
140            }
141    
142            /**
143            * Sets the ticket ID of this ticket.
144            *
145            * @param ticketId the ticket ID of this ticket
146            */
147            public void setTicketId(long ticketId) {
148                    _ticket.setTicketId(ticketId);
149            }
150    
151            /**
152            * Returns the company ID of this ticket.
153            *
154            * @return the company ID of this ticket
155            */
156            public long getCompanyId() {
157                    return _ticket.getCompanyId();
158            }
159    
160            /**
161            * Sets the company ID of this ticket.
162            *
163            * @param companyId the company ID of this ticket
164            */
165            public void setCompanyId(long companyId) {
166                    _ticket.setCompanyId(companyId);
167            }
168    
169            /**
170            * Returns the create date of this ticket.
171            *
172            * @return the create date of this ticket
173            */
174            public java.util.Date getCreateDate() {
175                    return _ticket.getCreateDate();
176            }
177    
178            /**
179            * Sets the create date of this ticket.
180            *
181            * @param createDate the create date of this ticket
182            */
183            public void setCreateDate(java.util.Date createDate) {
184                    _ticket.setCreateDate(createDate);
185            }
186    
187            /**
188            * Returns the fully qualified class name of this ticket.
189            *
190            * @return the fully qualified class name of this ticket
191            */
192            public java.lang.String getClassName() {
193                    return _ticket.getClassName();
194            }
195    
196            public void setClassName(java.lang.String className) {
197                    _ticket.setClassName(className);
198            }
199    
200            /**
201            * Returns the class name ID of this ticket.
202            *
203            * @return the class name ID of this ticket
204            */
205            public long getClassNameId() {
206                    return _ticket.getClassNameId();
207            }
208    
209            /**
210            * Sets the class name ID of this ticket.
211            *
212            * @param classNameId the class name ID of this ticket
213            */
214            public void setClassNameId(long classNameId) {
215                    _ticket.setClassNameId(classNameId);
216            }
217    
218            /**
219            * Returns the class p k of this ticket.
220            *
221            * @return the class p k of this ticket
222            */
223            public long getClassPK() {
224                    return _ticket.getClassPK();
225            }
226    
227            /**
228            * Sets the class p k of this ticket.
229            *
230            * @param classPK the class p k of this ticket
231            */
232            public void setClassPK(long classPK) {
233                    _ticket.setClassPK(classPK);
234            }
235    
236            /**
237            * Returns the key of this ticket.
238            *
239            * @return the key of this ticket
240            */
241            public java.lang.String getKey() {
242                    return _ticket.getKey();
243            }
244    
245            /**
246            * Sets the key of this ticket.
247            *
248            * @param key the key of this ticket
249            */
250            public void setKey(java.lang.String key) {
251                    _ticket.setKey(key);
252            }
253    
254            /**
255            * Returns the type of this ticket.
256            *
257            * @return the type of this ticket
258            */
259            public int getType() {
260                    return _ticket.getType();
261            }
262    
263            /**
264            * Sets the type of this ticket.
265            *
266            * @param type the type of this ticket
267            */
268            public void setType(int type) {
269                    _ticket.setType(type);
270            }
271    
272            /**
273            * Returns the extra info of this ticket.
274            *
275            * @return the extra info of this ticket
276            */
277            public java.lang.String getExtraInfo() {
278                    return _ticket.getExtraInfo();
279            }
280    
281            /**
282            * Sets the extra info of this ticket.
283            *
284            * @param extraInfo the extra info of this ticket
285            */
286            public void setExtraInfo(java.lang.String extraInfo) {
287                    _ticket.setExtraInfo(extraInfo);
288            }
289    
290            /**
291            * Returns the expiration date of this ticket.
292            *
293            * @return the expiration date of this ticket
294            */
295            public java.util.Date getExpirationDate() {
296                    return _ticket.getExpirationDate();
297            }
298    
299            /**
300            * Sets the expiration date of this ticket.
301            *
302            * @param expirationDate the expiration date of this ticket
303            */
304            public void setExpirationDate(java.util.Date expirationDate) {
305                    _ticket.setExpirationDate(expirationDate);
306            }
307    
308            public boolean isNew() {
309                    return _ticket.isNew();
310            }
311    
312            public void setNew(boolean n) {
313                    _ticket.setNew(n);
314            }
315    
316            public boolean isCachedModel() {
317                    return _ticket.isCachedModel();
318            }
319    
320            public void setCachedModel(boolean cachedModel) {
321                    _ticket.setCachedModel(cachedModel);
322            }
323    
324            public boolean isEscapedModel() {
325                    return _ticket.isEscapedModel();
326            }
327    
328            public java.io.Serializable getPrimaryKeyObj() {
329                    return _ticket.getPrimaryKeyObj();
330            }
331    
332            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
333                    _ticket.setPrimaryKeyObj(primaryKeyObj);
334            }
335    
336            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
337                    return _ticket.getExpandoBridge();
338            }
339    
340            public void setExpandoBridgeAttributes(
341                    com.liferay.portal.model.BaseModel<?> baseModel) {
342                    _ticket.setExpandoBridgeAttributes(baseModel);
343            }
344    
345            public void setExpandoBridgeAttributes(
346                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
347                    _ticket.setExpandoBridgeAttributes(expandoBridge);
348            }
349    
350            public void setExpandoBridgeAttributes(
351                    com.liferay.portal.service.ServiceContext serviceContext) {
352                    _ticket.setExpandoBridgeAttributes(serviceContext);
353            }
354    
355            @Override
356            public java.lang.Object clone() {
357                    return new TicketWrapper((Ticket)_ticket.clone());
358            }
359    
360            public int compareTo(com.liferay.portal.model.Ticket ticket) {
361                    return _ticket.compareTo(ticket);
362            }
363    
364            @Override
365            public int hashCode() {
366                    return _ticket.hashCode();
367            }
368    
369            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Ticket> toCacheModel() {
370                    return _ticket.toCacheModel();
371            }
372    
373            public com.liferay.portal.model.Ticket toEscapedModel() {
374                    return new TicketWrapper(_ticket.toEscapedModel());
375            }
376    
377            public com.liferay.portal.model.Ticket toUnescapedModel() {
378                    return new TicketWrapper(_ticket.toUnescapedModel());
379            }
380    
381            @Override
382            public java.lang.String toString() {
383                    return _ticket.toString();
384            }
385    
386            public java.lang.String toXmlString() {
387                    return _ticket.toXmlString();
388            }
389    
390            public void persist()
391                    throws com.liferay.portal.kernel.exception.SystemException {
392                    _ticket.persist();
393            }
394    
395            public boolean isExpired() {
396                    return _ticket.isExpired();
397            }
398    
399            /**
400             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
401             */
402            public Ticket getWrappedTicket() {
403                    return _ticket;
404            }
405    
406            public Ticket getWrappedModel() {
407                    return _ticket;
408            }
409    
410            public void resetOriginalValues() {
411                    _ticket.resetOriginalValues();
412            }
413    
414            private Ticket _ticket;
415    }