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.asset.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.Date;
21  import java.util.List;
22  
23  /**
24   * <a href="AssetLinkSoap.java.html"><b><i>View Source</i></b></a>
25   *
26   * <p>
27   * ServiceBuilder generated this class. Modifications in this class will be
28   * overwritten the next time is generated.
29   * </p>
30   *
31   * <p>
32   * This class is used by
33   * {@link com.liferay.portlet.asset.service.http.AssetLinkServiceSoap}.
34   * </p>
35   *
36   * @author    Brian Wing Shun Chan
37   * @see       com.liferay.portlet.asset.service.http.AssetLinkServiceSoap
38   * @generated
39   */
40  public class AssetLinkSoap implements Serializable {
41      public static AssetLinkSoap toSoapModel(AssetLink model) {
42          AssetLinkSoap soapModel = new AssetLinkSoap();
43  
44          soapModel.setLinkId(model.getLinkId());
45          soapModel.setCompanyId(model.getCompanyId());
46          soapModel.setUserId(model.getUserId());
47          soapModel.setUserName(model.getUserName());
48          soapModel.setCreateDate(model.getCreateDate());
49          soapModel.setEntryId1(model.getEntryId1());
50          soapModel.setEntryId2(model.getEntryId2());
51          soapModel.setType(model.getType());
52          soapModel.setWeight(model.getWeight());
53  
54          return soapModel;
55      }
56  
57      public static AssetLinkSoap[] toSoapModels(AssetLink[] models) {
58          AssetLinkSoap[] soapModels = new AssetLinkSoap[models.length];
59  
60          for (int i = 0; i < models.length; i++) {
61              soapModels[i] = toSoapModel(models[i]);
62          }
63  
64          return soapModels;
65      }
66  
67      public static AssetLinkSoap[][] toSoapModels(AssetLink[][] models) {
68          AssetLinkSoap[][] soapModels = null;
69  
70          if (models.length > 0) {
71              soapModels = new AssetLinkSoap[models.length][models[0].length];
72          }
73          else {
74              soapModels = new AssetLinkSoap[0][0];
75          }
76  
77          for (int i = 0; i < models.length; i++) {
78              soapModels[i] = toSoapModels(models[i]);
79          }
80  
81          return soapModels;
82      }
83  
84      public static AssetLinkSoap[] toSoapModels(List<AssetLink> models) {
85          List<AssetLinkSoap> soapModels = new ArrayList<AssetLinkSoap>(models.size());
86  
87          for (AssetLink model : models) {
88              soapModels.add(toSoapModel(model));
89          }
90  
91          return soapModels.toArray(new AssetLinkSoap[soapModels.size()]);
92      }
93  
94      public AssetLinkSoap() {
95      }
96  
97      public long getPrimaryKey() {
98          return _linkId;
99      }
100 
101     public void setPrimaryKey(long pk) {
102         setLinkId(pk);
103     }
104 
105     public long getLinkId() {
106         return _linkId;
107     }
108 
109     public void setLinkId(long linkId) {
110         _linkId = linkId;
111     }
112 
113     public long getCompanyId() {
114         return _companyId;
115     }
116 
117     public void setCompanyId(long companyId) {
118         _companyId = companyId;
119     }
120 
121     public long getUserId() {
122         return _userId;
123     }
124 
125     public void setUserId(long userId) {
126         _userId = userId;
127     }
128 
129     public String getUserName() {
130         return _userName;
131     }
132 
133     public void setUserName(String userName) {
134         _userName = userName;
135     }
136 
137     public Date getCreateDate() {
138         return _createDate;
139     }
140 
141     public void setCreateDate(Date createDate) {
142         _createDate = createDate;
143     }
144 
145     public long getEntryId1() {
146         return _entryId1;
147     }
148 
149     public void setEntryId1(long entryId1) {
150         _entryId1 = entryId1;
151     }
152 
153     public long getEntryId2() {
154         return _entryId2;
155     }
156 
157     public void setEntryId2(long entryId2) {
158         _entryId2 = entryId2;
159     }
160 
161     public int getType() {
162         return _type;
163     }
164 
165     public void setType(int type) {
166         _type = type;
167     }
168 
169     public int getWeight() {
170         return _weight;
171     }
172 
173     public void setWeight(int weight) {
174         _weight = weight;
175     }
176 
177     private long _linkId;
178     private long _companyId;
179     private long _userId;
180     private String _userName;
181     private Date _createDate;
182     private long _entryId1;
183     private long _entryId2;
184     private int _type;
185     private int _weight;
186 }