001    /**
002     * Copyright (c) 2000-2012 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.portlet.dynamicdatamapping.model;
016    
017    import java.io.Serializable;
018    
019    import java.util.ArrayList;
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * This class is used by SOAP remote services, specifically {@link com.liferay.portlet.dynamicdatamapping.service.http.DDMTemplateServiceSoap}.
025     *
026     * @author    Brian Wing Shun Chan
027     * @see       com.liferay.portlet.dynamicdatamapping.service.http.DDMTemplateServiceSoap
028     * @generated
029     */
030    public class DDMTemplateSoap implements Serializable {
031            public static DDMTemplateSoap toSoapModel(DDMTemplate model) {
032                    DDMTemplateSoap soapModel = new DDMTemplateSoap();
033    
034                    soapModel.setUuid(model.getUuid());
035                    soapModel.setTemplateId(model.getTemplateId());
036                    soapModel.setGroupId(model.getGroupId());
037                    soapModel.setCompanyId(model.getCompanyId());
038                    soapModel.setUserId(model.getUserId());
039                    soapModel.setUserName(model.getUserName());
040                    soapModel.setCreateDate(model.getCreateDate());
041                    soapModel.setModifiedDate(model.getModifiedDate());
042                    soapModel.setClassNameId(model.getClassNameId());
043                    soapModel.setClassPK(model.getClassPK());
044                    soapModel.setTemplateKey(model.getTemplateKey());
045                    soapModel.setName(model.getName());
046                    soapModel.setDescription(model.getDescription());
047                    soapModel.setType(model.getType());
048                    soapModel.setMode(model.getMode());
049                    soapModel.setLanguage(model.getLanguage());
050                    soapModel.setScript(model.getScript());
051                    soapModel.setCacheable(model.getCacheable());
052    
053                    return soapModel;
054            }
055    
056            public static DDMTemplateSoap[] toSoapModels(DDMTemplate[] models) {
057                    DDMTemplateSoap[] soapModels = new DDMTemplateSoap[models.length];
058    
059                    for (int i = 0; i < models.length; i++) {
060                            soapModels[i] = toSoapModel(models[i]);
061                    }
062    
063                    return soapModels;
064            }
065    
066            public static DDMTemplateSoap[][] toSoapModels(DDMTemplate[][] models) {
067                    DDMTemplateSoap[][] soapModels = null;
068    
069                    if (models.length > 0) {
070                            soapModels = new DDMTemplateSoap[models.length][models[0].length];
071                    }
072                    else {
073                            soapModels = new DDMTemplateSoap[0][0];
074                    }
075    
076                    for (int i = 0; i < models.length; i++) {
077                            soapModels[i] = toSoapModels(models[i]);
078                    }
079    
080                    return soapModels;
081            }
082    
083            public static DDMTemplateSoap[] toSoapModels(List<DDMTemplate> models) {
084                    List<DDMTemplateSoap> soapModels = new ArrayList<DDMTemplateSoap>(models.size());
085    
086                    for (DDMTemplate model : models) {
087                            soapModels.add(toSoapModel(model));
088                    }
089    
090                    return soapModels.toArray(new DDMTemplateSoap[soapModels.size()]);
091            }
092    
093            public DDMTemplateSoap() {
094            }
095    
096            public long getPrimaryKey() {
097                    return _templateId;
098            }
099    
100            public void setPrimaryKey(long pk) {
101                    setTemplateId(pk);
102            }
103    
104            public String getUuid() {
105                    return _uuid;
106            }
107    
108            public void setUuid(String uuid) {
109                    _uuid = uuid;
110            }
111    
112            public long getTemplateId() {
113                    return _templateId;
114            }
115    
116            public void setTemplateId(long templateId) {
117                    _templateId = templateId;
118            }
119    
120            public long getGroupId() {
121                    return _groupId;
122            }
123    
124            public void setGroupId(long groupId) {
125                    _groupId = groupId;
126            }
127    
128            public long getCompanyId() {
129                    return _companyId;
130            }
131    
132            public void setCompanyId(long companyId) {
133                    _companyId = companyId;
134            }
135    
136            public long getUserId() {
137                    return _userId;
138            }
139    
140            public void setUserId(long userId) {
141                    _userId = userId;
142            }
143    
144            public String getUserName() {
145                    return _userName;
146            }
147    
148            public void setUserName(String userName) {
149                    _userName = userName;
150            }
151    
152            public Date getCreateDate() {
153                    return _createDate;
154            }
155    
156            public void setCreateDate(Date createDate) {
157                    _createDate = createDate;
158            }
159    
160            public Date getModifiedDate() {
161                    return _modifiedDate;
162            }
163    
164            public void setModifiedDate(Date modifiedDate) {
165                    _modifiedDate = modifiedDate;
166            }
167    
168            public long getClassNameId() {
169                    return _classNameId;
170            }
171    
172            public void setClassNameId(long classNameId) {
173                    _classNameId = classNameId;
174            }
175    
176            public long getClassPK() {
177                    return _classPK;
178            }
179    
180            public void setClassPK(long classPK) {
181                    _classPK = classPK;
182            }
183    
184            public String getTemplateKey() {
185                    return _templateKey;
186            }
187    
188            public void setTemplateKey(String templateKey) {
189                    _templateKey = templateKey;
190            }
191    
192            public String getName() {
193                    return _name;
194            }
195    
196            public void setName(String name) {
197                    _name = name;
198            }
199    
200            public String getDescription() {
201                    return _description;
202            }
203    
204            public void setDescription(String description) {
205                    _description = description;
206            }
207    
208            public String getType() {
209                    return _type;
210            }
211    
212            public void setType(String type) {
213                    _type = type;
214            }
215    
216            public String getMode() {
217                    return _mode;
218            }
219    
220            public void setMode(String mode) {
221                    _mode = mode;
222            }
223    
224            public String getLanguage() {
225                    return _language;
226            }
227    
228            public void setLanguage(String language) {
229                    _language = language;
230            }
231    
232            public String getScript() {
233                    return _script;
234            }
235    
236            public void setScript(String script) {
237                    _script = script;
238            }
239    
240            public boolean getCacheable() {
241                    return _cacheable;
242            }
243    
244            public boolean isCacheable() {
245                    return _cacheable;
246            }
247    
248            public void setCacheable(boolean cacheable) {
249                    _cacheable = cacheable;
250            }
251    
252            private String _uuid;
253            private long _templateId;
254            private long _groupId;
255            private long _companyId;
256            private long _userId;
257            private String _userName;
258            private Date _createDate;
259            private Date _modifiedDate;
260            private long _classNameId;
261            private long _classPK;
262            private String _templateKey;
263            private String _name;
264            private String _description;
265            private String _type;
266            private String _mode;
267            private String _language;
268            private String _script;
269            private boolean _cacheable;
270    }