1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.model;
21  
22  import java.io.Serializable;
23  
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * <a href="TagsSourceSoap.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class is used by
37   * <code>com.liferay.portlet.tags.service.http.TagsSourceServiceSoap</code>.
38   * </p>
39   *
40   * @author Brian Wing Shun Chan
41   *
42   * @see com.liferay.portlet.tags.service.http.TagsSourceServiceSoap
43   *
44   */
45  public class TagsSourceSoap implements Serializable {
46      public static TagsSourceSoap toSoapModel(TagsSource model) {
47          TagsSourceSoap soapModel = new TagsSourceSoap();
48  
49          soapModel.setSourceId(model.getSourceId());
50          soapModel.setParentSourceId(model.getParentSourceId());
51          soapModel.setName(model.getName());
52          soapModel.setAcronym(model.getAcronym());
53  
54          return soapModel;
55      }
56  
57      public static TagsSourceSoap[] toSoapModels(TagsSource[] models) {
58          TagsSourceSoap[] soapModels = new TagsSourceSoap[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 TagsSourceSoap[][] toSoapModels(TagsSource[][] models) {
68          TagsSourceSoap[][] soapModels = null;
69  
70          if (models.length > 0) {
71              soapModels = new TagsSourceSoap[models.length][models[0].length];
72          }
73          else {
74              soapModels = new TagsSourceSoap[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 TagsSourceSoap[] toSoapModels(List<TagsSource> models) {
85          List<TagsSourceSoap> soapModels = new ArrayList<TagsSourceSoap>(models.size());
86  
87          for (TagsSource model : models) {
88              soapModels.add(toSoapModel(model));
89          }
90  
91          return soapModels.toArray(new TagsSourceSoap[soapModels.size()]);
92      }
93  
94      public TagsSourceSoap() {
95      }
96  
97      public long getPrimaryKey() {
98          return _sourceId;
99      }
100 
101     public void setPrimaryKey(long pk) {
102         setSourceId(pk);
103     }
104 
105     public long getSourceId() {
106         return _sourceId;
107     }
108 
109     public void setSourceId(long sourceId) {
110         _sourceId = sourceId;
111     }
112 
113     public long getParentSourceId() {
114         return _parentSourceId;
115     }
116 
117     public void setParentSourceId(long parentSourceId) {
118         _parentSourceId = parentSourceId;
119     }
120 
121     public String getName() {
122         return _name;
123     }
124 
125     public void setName(String name) {
126         _name = name;
127     }
128 
129     public String getAcronym() {
130         return _acronym;
131     }
132 
133     public void setAcronym(String acronym) {
134         _acronym = acronym;
135     }
136 
137     private long _sourceId;
138     private long _parentSourceId;
139     private String _name;
140     private String _acronym;
141 }