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="ServiceComponentSoap.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.ServiceComponentServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ServiceComponentServiceSoap
37   * @generated
38   */
39  public class ServiceComponentSoap implements Serializable {
40      public static ServiceComponentSoap toSoapModel(ServiceComponent model) {
41          ServiceComponentSoap soapModel = new ServiceComponentSoap();
42  
43          soapModel.setServiceComponentId(model.getServiceComponentId());
44          soapModel.setBuildNamespace(model.getBuildNamespace());
45          soapModel.setBuildNumber(model.getBuildNumber());
46          soapModel.setBuildDate(model.getBuildDate());
47          soapModel.setData(model.getData());
48  
49          return soapModel;
50      }
51  
52      public static ServiceComponentSoap[] toSoapModels(ServiceComponent[] models) {
53          ServiceComponentSoap[] soapModels = new ServiceComponentSoap[models.length];
54  
55          for (int i = 0; i < models.length; i++) {
56              soapModels[i] = toSoapModel(models[i]);
57          }
58  
59          return soapModels;
60      }
61  
62      public static ServiceComponentSoap[][] toSoapModels(
63          ServiceComponent[][] models) {
64          ServiceComponentSoap[][] soapModels = null;
65  
66          if (models.length > 0) {
67              soapModels = new ServiceComponentSoap[models.length][models[0].length];
68          }
69          else {
70              soapModels = new ServiceComponentSoap[0][0];
71          }
72  
73          for (int i = 0; i < models.length; i++) {
74              soapModels[i] = toSoapModels(models[i]);
75          }
76  
77          return soapModels;
78      }
79  
80      public static ServiceComponentSoap[] toSoapModels(
81          List<ServiceComponent> models) {
82          List<ServiceComponentSoap> soapModels = new ArrayList<ServiceComponentSoap>(models.size());
83  
84          for (ServiceComponent model : models) {
85              soapModels.add(toSoapModel(model));
86          }
87  
88          return soapModels.toArray(new ServiceComponentSoap[soapModels.size()]);
89      }
90  
91      public ServiceComponentSoap() {
92      }
93  
94      public long getPrimaryKey() {
95          return _serviceComponentId;
96      }
97  
98      public void setPrimaryKey(long pk) {
99          setServiceComponentId(pk);
100     }
101 
102     public long getServiceComponentId() {
103         return _serviceComponentId;
104     }
105 
106     public void setServiceComponentId(long serviceComponentId) {
107         _serviceComponentId = serviceComponentId;
108     }
109 
110     public String getBuildNamespace() {
111         return _buildNamespace;
112     }
113 
114     public void setBuildNamespace(String buildNamespace) {
115         _buildNamespace = buildNamespace;
116     }
117 
118     public long getBuildNumber() {
119         return _buildNumber;
120     }
121 
122     public void setBuildNumber(long buildNumber) {
123         _buildNumber = buildNumber;
124     }
125 
126     public long getBuildDate() {
127         return _buildDate;
128     }
129 
130     public void setBuildDate(long buildDate) {
131         _buildDate = buildDate;
132     }
133 
134     public String getData() {
135         return _data;
136     }
137 
138     public void setData(String data) {
139         _data = data;
140     }
141 
142     private long _serviceComponentId;
143     private String _buildNamespace;
144     private long _buildNumber;
145     private long _buildDate;
146     private String _data;
147 }