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="ShardSoap.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.ShardServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ShardServiceSoap
37   * @generated
38   */
39  public class ShardSoap implements Serializable {
40      public static ShardSoap toSoapModel(Shard model) {
41          ShardSoap soapModel = new ShardSoap();
42  
43          soapModel.setShardId(model.getShardId());
44          soapModel.setClassNameId(model.getClassNameId());
45          soapModel.setClassPK(model.getClassPK());
46          soapModel.setName(model.getName());
47  
48          return soapModel;
49      }
50  
51      public static ShardSoap[] toSoapModels(Shard[] models) {
52          ShardSoap[] soapModels = new ShardSoap[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 ShardSoap[][] toSoapModels(Shard[][] models) {
62          ShardSoap[][] soapModels = null;
63  
64          if (models.length > 0) {
65              soapModels = new ShardSoap[models.length][models[0].length];
66          }
67          else {
68              soapModels = new ShardSoap[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 ShardSoap[] toSoapModels(List<Shard> models) {
79          List<ShardSoap> soapModels = new ArrayList<ShardSoap>(models.size());
80  
81          for (Shard model : models) {
82              soapModels.add(toSoapModel(model));
83          }
84  
85          return soapModels.toArray(new ShardSoap[soapModels.size()]);
86      }
87  
88      public ShardSoap() {
89      }
90  
91      public long getPrimaryKey() {
92          return _shardId;
93      }
94  
95      public void setPrimaryKey(long pk) {
96          setShardId(pk);
97      }
98  
99      public long getShardId() {
100         return _shardId;
101     }
102 
103     public void setShardId(long shardId) {
104         _shardId = shardId;
105     }
106 
107     public long getClassNameId() {
108         return _classNameId;
109     }
110 
111     public void setClassNameId(long classNameId) {
112         _classNameId = classNameId;
113     }
114 
115     public long getClassPK() {
116         return _classPK;
117     }
118 
119     public void setClassPK(long classPK) {
120         _classPK = classPK;
121     }
122 
123     public String getName() {
124         return _name;
125     }
126 
127     public void setName(String name) {
128         _name = name;
129     }
130 
131     private long _shardId;
132     private long _classNameId;
133     private long _classPK;
134     private String _name;
135 }