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.portlet.journal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="JournalArticleResourceSoap.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.portlet.journal.service.http.JournalArticleResourceServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portlet.journal.service.http.JournalArticleResourceServiceSoap
37   * @generated
38   */
39  public class JournalArticleResourceSoap implements Serializable {
40      public static JournalArticleResourceSoap toSoapModel(
41          JournalArticleResource model) {
42          JournalArticleResourceSoap soapModel = new JournalArticleResourceSoap();
43  
44          soapModel.setResourcePrimKey(model.getResourcePrimKey());
45          soapModel.setGroupId(model.getGroupId());
46          soapModel.setArticleId(model.getArticleId());
47  
48          return soapModel;
49      }
50  
51      public static JournalArticleResourceSoap[] toSoapModels(
52          JournalArticleResource[] models) {
53          JournalArticleResourceSoap[] soapModels = new JournalArticleResourceSoap[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 JournalArticleResourceSoap[][] toSoapModels(
63          JournalArticleResource[][] models) {
64          JournalArticleResourceSoap[][] soapModels = null;
65  
66          if (models.length > 0) {
67              soapModels = new JournalArticleResourceSoap[models.length][models[0].length];
68          }
69          else {
70              soapModels = new JournalArticleResourceSoap[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 JournalArticleResourceSoap[] toSoapModels(
81          List<JournalArticleResource> models) {
82          List<JournalArticleResourceSoap> soapModels = new ArrayList<JournalArticleResourceSoap>(models.size());
83  
84          for (JournalArticleResource model : models) {
85              soapModels.add(toSoapModel(model));
86          }
87  
88          return soapModels.toArray(new JournalArticleResourceSoap[soapModels.size()]);
89      }
90  
91      public JournalArticleResourceSoap() {
92      }
93  
94      public long getPrimaryKey() {
95          return _resourcePrimKey;
96      }
97  
98      public void setPrimaryKey(long pk) {
99          setResourcePrimKey(pk);
100     }
101 
102     public long getResourcePrimKey() {
103         return _resourcePrimKey;
104     }
105 
106     public void setResourcePrimKey(long resourcePrimKey) {
107         _resourcePrimKey = resourcePrimKey;
108     }
109 
110     public long getGroupId() {
111         return _groupId;
112     }
113 
114     public void setGroupId(long groupId) {
115         _groupId = groupId;
116     }
117 
118     public String getArticleId() {
119         return _articleId;
120     }
121 
122     public void setArticleId(String articleId) {
123         _articleId = articleId;
124     }
125 
126     private long _resourcePrimKey;
127     private long _groupId;
128     private String _articleId;
129 }