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