1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="ClassNameSoap.java.html"><b><i>View Source</i></b></a>
24   *
25   * <p>
26   * ServiceBuilder generated this class. Modifications in this class will be
27   * overwritten the next time is generated.
28   * </p>
29   *
30   * <p>
31   * This class is used by
32   * {@link com.liferay.portal.service.http.ClassNameServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ClassNameServiceSoap
37   * @generated
38   */
39  public class ClassNameSoap implements Serializable {
40      public static ClassNameSoap toSoapModel(ClassName model) {
41          ClassNameSoap soapModel = new ClassNameSoap();
42  
43          soapModel.setClassNameId(model.getClassNameId());
44          soapModel.setValue(model.getValue());
45  
46          return soapModel;
47      }
48  
49      public static ClassNameSoap[] toSoapModels(ClassName[] models) {
50          ClassNameSoap[] soapModels = new ClassNameSoap[models.length];
51  
52          for (int i = 0; i < models.length; i++) {
53              soapModels[i] = toSoapModel(models[i]);
54          }
55  
56          return soapModels;
57      }
58  
59      public static ClassNameSoap[][] toSoapModels(ClassName[][] models) {
60          ClassNameSoap[][] soapModels = null;
61  
62          if (models.length > 0) {
63              soapModels = new ClassNameSoap[models.length][models[0].length];
64          }
65          else {
66              soapModels = new ClassNameSoap[0][0];
67          }
68  
69          for (int i = 0; i < models.length; i++) {
70              soapModels[i] = toSoapModels(models[i]);
71          }
72  
73          return soapModels;
74      }
75  
76      public static ClassNameSoap[] toSoapModels(List<ClassName> models) {
77          List<ClassNameSoap> soapModels = new ArrayList<ClassNameSoap>(models.size());
78  
79          for (ClassName model : models) {
80              soapModels.add(toSoapModel(model));
81          }
82  
83          return soapModels.toArray(new ClassNameSoap[soapModels.size()]);
84      }
85  
86      public ClassNameSoap() {
87      }
88  
89      public long getPrimaryKey() {
90          return _classNameId;
91      }
92  
93      public void setPrimaryKey(long pk) {
94          setClassNameId(pk);
95      }
96  
97      public long getClassNameId() {
98          return _classNameId;
99      }
100 
101     public void setClassNameId(long classNameId) {
102         _classNameId = classNameId;
103     }
104 
105     public String getValue() {
106         return _value;
107     }
108 
109     public void setValue(String value) {
110         _value = value;
111     }
112 
113     private long _classNameId;
114     private String _value;
115 }