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="ResourceSoap.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.ResourceServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ResourceServiceSoap
37   * @generated
38   */
39  public class ResourceSoap implements Serializable {
40      public static ResourceSoap toSoapModel(Resource model) {
41          ResourceSoap soapModel = new ResourceSoap();
42  
43          soapModel.setResourceId(model.getResourceId());
44          soapModel.setCodeId(model.getCodeId());
45          soapModel.setPrimKey(model.getPrimKey());
46  
47          return soapModel;
48      }
49  
50      public static ResourceSoap[] toSoapModels(Resource[] models) {
51          ResourceSoap[] soapModels = new ResourceSoap[models.length];
52  
53          for (int i = 0; i < models.length; i++) {
54              soapModels[i] = toSoapModel(models[i]);
55          }
56  
57          return soapModels;
58      }
59  
60      public static ResourceSoap[][] toSoapModels(Resource[][] models) {
61          ResourceSoap[][] soapModels = null;
62  
63          if (models.length > 0) {
64              soapModels = new ResourceSoap[models.length][models[0].length];
65          }
66          else {
67              soapModels = new ResourceSoap[0][0];
68          }
69  
70          for (int i = 0; i < models.length; i++) {
71              soapModels[i] = toSoapModels(models[i]);
72          }
73  
74          return soapModels;
75      }
76  
77      public static ResourceSoap[] toSoapModels(List<Resource> models) {
78          List<ResourceSoap> soapModels = new ArrayList<ResourceSoap>(models.size());
79  
80          for (Resource model : models) {
81              soapModels.add(toSoapModel(model));
82          }
83  
84          return soapModels.toArray(new ResourceSoap[soapModels.size()]);
85      }
86  
87      public ResourceSoap() {
88      }
89  
90      public long getPrimaryKey() {
91          return _resourceId;
92      }
93  
94      public void setPrimaryKey(long pk) {
95          setResourceId(pk);
96      }
97  
98      public long getResourceId() {
99          return _resourceId;
100     }
101 
102     public void setResourceId(long resourceId) {
103         _resourceId = resourceId;
104     }
105 
106     public long getCodeId() {
107         return _codeId;
108     }
109 
110     public void setCodeId(long codeId) {
111         _codeId = codeId;
112     }
113 
114     public String getPrimKey() {
115         return _primKey;
116     }
117 
118     public void setPrimKey(String primKey) {
119         _primKey = primKey;
120     }
121 
122     private long _resourceId;
123     private long _codeId;
124     private String _primKey;
125 }