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.tags.model;
24  
25  import java.io.Serializable;
26  
27  import java.util.ArrayList;
28  import java.util.List;
29  
30  /**
31   * <a href="TagsSourceSoap.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.tags.service.http.TagsSourceServiceSoap}.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       com.liferay.portlet.tags.service.http.TagsSourceServiceSoap
45   * @generated
46   */
47  public class TagsSourceSoap implements Serializable {
48      public static TagsSourceSoap toSoapModel(TagsSource model) {
49          TagsSourceSoap soapModel = new TagsSourceSoap();
50  
51          soapModel.setSourceId(model.getSourceId());
52          soapModel.setParentSourceId(model.getParentSourceId());
53          soapModel.setName(model.getName());
54          soapModel.setAcronym(model.getAcronym());
55  
56          return soapModel;
57      }
58  
59      public static TagsSourceSoap[] toSoapModels(TagsSource[] models) {
60          TagsSourceSoap[] soapModels = new TagsSourceSoap[models.length];
61  
62          for (int i = 0; i < models.length; i++) {
63              soapModels[i] = toSoapModel(models[i]);
64          }
65  
66          return soapModels;
67      }
68  
69      public static TagsSourceSoap[][] toSoapModels(TagsSource[][] models) {
70          TagsSourceSoap[][] soapModels = null;
71  
72          if (models.length > 0) {
73              soapModels = new TagsSourceSoap[models.length][models[0].length];
74          }
75          else {
76              soapModels = new TagsSourceSoap[0][0];
77          }
78  
79          for (int i = 0; i < models.length; i++) {
80              soapModels[i] = toSoapModels(models[i]);
81          }
82  
83          return soapModels;
84      }
85  
86      public static TagsSourceSoap[] toSoapModels(List<TagsSource> models) {
87          List<TagsSourceSoap> soapModels = new ArrayList<TagsSourceSoap>(models.size());
88  
89          for (TagsSource model : models) {
90              soapModels.add(toSoapModel(model));
91          }
92  
93          return soapModels.toArray(new TagsSourceSoap[soapModels.size()]);
94      }
95  
96      public TagsSourceSoap() {
97      }
98  
99      public long getPrimaryKey() {
100         return _sourceId;
101     }
102 
103     public void setPrimaryKey(long pk) {
104         setSourceId(pk);
105     }
106 
107     public long getSourceId() {
108         return _sourceId;
109     }
110 
111     public void setSourceId(long sourceId) {
112         _sourceId = sourceId;
113     }
114 
115     public long getParentSourceId() {
116         return _parentSourceId;
117     }
118 
119     public void setParentSourceId(long parentSourceId) {
120         _parentSourceId = parentSourceId;
121     }
122 
123     public String getName() {
124         return _name;
125     }
126 
127     public void setName(String name) {
128         _name = name;
129     }
130 
131     public String getAcronym() {
132         return _acronym;
133     }
134 
135     public void setAcronym(String acronym) {
136         _acronym = acronym;
137     }
138 
139     private long _sourceId;
140     private long _parentSourceId;
141     private String _name;
142     private String _acronym;
143 }