1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="JournalArticleResourceSoap.java.html"><b><i>View Source</i></b></a>
32   *
33   * <p>
34   * ServiceBuilder generated this class. Modifications in this class will be
35   * overwritten the next time is generated.
36   * </p>
37   *
38   * <p>
39   * This class is used by
40   * {@link com.liferay.portlet.journal.service.http.JournalArticleResourceServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portlet.journal.service.http.JournalArticleResourceServiceSoap
45   * @generated
46   */
47  public class JournalArticleResourceSoap implements Serializable {
48      public static JournalArticleResourceSoap toSoapModel(
49          JournalArticleResource model) {
50          JournalArticleResourceSoap soapModel = new JournalArticleResourceSoap();
51  
52          soapModel.setResourcePrimKey(model.getResourcePrimKey());
53          soapModel.setGroupId(model.getGroupId());
54          soapModel.setArticleId(model.getArticleId());
55  
56          return soapModel;
57      }
58  
59      public static JournalArticleResourceSoap[] toSoapModels(
60          JournalArticleResource[] models) {
61          JournalArticleResourceSoap[] soapModels = new JournalArticleResourceSoap[models.length];
62  
63          for (int i = 0; i < models.length; i++) {
64              soapModels[i] = toSoapModel(models[i]);
65          }
66  
67          return soapModels;
68      }
69  
70      public static JournalArticleResourceSoap[][] toSoapModels(
71          JournalArticleResource[][] models) {
72          JournalArticleResourceSoap[][] soapModels = null;
73  
74          if (models.length > 0) {
75              soapModels = new JournalArticleResourceSoap[models.length][models[0].length];
76          }
77          else {
78              soapModels = new JournalArticleResourceSoap[0][0];
79          }
80  
81          for (int i = 0; i < models.length; i++) {
82              soapModels[i] = toSoapModels(models[i]);
83          }
84  
85          return soapModels;
86      }
87  
88      public static JournalArticleResourceSoap[] toSoapModels(
89          List<JournalArticleResource> models) {
90          List<JournalArticleResourceSoap> soapModels = new ArrayList<JournalArticleResourceSoap>(models.size());
91  
92          for (JournalArticleResource model : models) {
93              soapModels.add(toSoapModel(model));
94          }
95  
96          return soapModels.toArray(new JournalArticleResourceSoap[soapModels.size()]);
97      }
98  
99      public JournalArticleResourceSoap() {
100     }
101 
102     public long getPrimaryKey() {
103         return _resourcePrimKey;
104     }
105 
106     public void setPrimaryKey(long pk) {
107         setResourcePrimKey(pk);
108     }
109 
110     public long getResourcePrimKey() {
111         return _resourcePrimKey;
112     }
113 
114     public void setResourcePrimKey(long resourcePrimKey) {
115         _resourcePrimKey = resourcePrimKey;
116     }
117 
118     public long getGroupId() {
119         return _groupId;
120     }
121 
122     public void setGroupId(long groupId) {
123         _groupId = groupId;
124     }
125 
126     public String getArticleId() {
127         return _articleId;
128     }
129 
130     public void setArticleId(String articleId) {
131         _articleId = articleId;
132     }
133 
134     private long _resourcePrimKey;
135     private long _groupId;
136     private String _articleId;
137 }