1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="TicketSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portal.service.http.TicketServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portal.service.http.TicketServiceSoap
38   * @generated
39   */
40  public class TicketSoap implements Serializable {
41      public static TicketSoap toSoapModel(Ticket model) {
42          TicketSoap soapModel = new TicketSoap();
43  
44          soapModel.setTicketId(model.getTicketId());
45          soapModel.setCompanyId(model.getCompanyId());
46          soapModel.setCreateDate(model.getCreateDate());
47          soapModel.setClassNameId(model.getClassNameId());
48          soapModel.setClassPK(model.getClassPK());
49          soapModel.setKey(model.getKey());
50          soapModel.setExpirationDate(model.getExpirationDate());
51  
52          return soapModel;
53      }
54  
55      public static TicketSoap[] toSoapModels(Ticket[] models) {
56          TicketSoap[] soapModels = new TicketSoap[models.length];
57  
58          for (int i = 0; i < models.length; i++) {
59              soapModels[i] = toSoapModel(models[i]);
60          }
61  
62          return soapModels;
63      }
64  
65      public static TicketSoap[][] toSoapModels(Ticket[][] models) {
66          TicketSoap[][] soapModels = null;
67  
68          if (models.length > 0) {
69              soapModels = new TicketSoap[models.length][models[0].length];
70          }
71          else {
72              soapModels = new TicketSoap[0][0];
73          }
74  
75          for (int i = 0; i < models.length; i++) {
76              soapModels[i] = toSoapModels(models[i]);
77          }
78  
79          return soapModels;
80      }
81  
82      public static TicketSoap[] toSoapModels(List<Ticket> models) {
83          List<TicketSoap> soapModels = new ArrayList<TicketSoap>(models.size());
84  
85          for (Ticket model : models) {
86              soapModels.add(toSoapModel(model));
87          }
88  
89          return soapModels.toArray(new TicketSoap[soapModels.size()]);
90      }
91  
92      public TicketSoap() {
93      }
94  
95      public long getPrimaryKey() {
96          return _ticketId;
97      }
98  
99      public void setPrimaryKey(long pk) {
100         setTicketId(pk);
101     }
102 
103     public long getTicketId() {
104         return _ticketId;
105     }
106 
107     public void setTicketId(long ticketId) {
108         _ticketId = ticketId;
109     }
110 
111     public long getCompanyId() {
112         return _companyId;
113     }
114 
115     public void setCompanyId(long companyId) {
116         _companyId = companyId;
117     }
118 
119     public Date getCreateDate() {
120         return _createDate;
121     }
122 
123     public void setCreateDate(Date createDate) {
124         _createDate = createDate;
125     }
126 
127     public long getClassNameId() {
128         return _classNameId;
129     }
130 
131     public void setClassNameId(long classNameId) {
132         _classNameId = classNameId;
133     }
134 
135     public long getClassPK() {
136         return _classPK;
137     }
138 
139     public void setClassPK(long classPK) {
140         _classPK = classPK;
141     }
142 
143     public String getKey() {
144         return _key;
145     }
146 
147     public void setKey(String key) {
148         _key = key;
149     }
150 
151     public Date getExpirationDate() {
152         return _expirationDate;
153     }
154 
155     public void setExpirationDate(Date expirationDate) {
156         _expirationDate = expirationDate;
157     }
158 
159     private long _ticketId;
160     private long _companyId;
161     private Date _createDate;
162     private long _classNameId;
163     private long _classPK;
164     private String _key;
165     private Date _expirationDate;
166 }