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.portal.model;
16  
17  import java.io.Serializable;
18  
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  /**
23   * <a href="ResourceActionSoap.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.ResourceActionServiceSoap}.
33   * </p>
34   *
35   * @author    Brian Wing Shun Chan
36   * @see       com.liferay.portal.service.http.ResourceActionServiceSoap
37   * @generated
38   */
39  public class ResourceActionSoap implements Serializable {
40      public static ResourceActionSoap toSoapModel(ResourceAction model) {
41          ResourceActionSoap soapModel = new ResourceActionSoap();
42  
43          soapModel.setResourceActionId(model.getResourceActionId());
44          soapModel.setName(model.getName());
45          soapModel.setActionId(model.getActionId());
46          soapModel.setBitwiseValue(model.getBitwiseValue());
47  
48          return soapModel;
49      }
50  
51      public static ResourceActionSoap[] toSoapModels(ResourceAction[] models) {
52          ResourceActionSoap[] soapModels = new ResourceActionSoap[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 ResourceActionSoap[][] toSoapModels(ResourceAction[][] models) {
62          ResourceActionSoap[][] soapModels = null;
63  
64          if (models.length > 0) {
65              soapModels = new ResourceActionSoap[models.length][models[0].length];
66          }
67          else {
68              soapModels = new ResourceActionSoap[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 ResourceActionSoap[] toSoapModels(List<ResourceAction> models) {
79          List<ResourceActionSoap> soapModels = new ArrayList<ResourceActionSoap>(models.size());
80  
81          for (ResourceAction model : models) {
82              soapModels.add(toSoapModel(model));
83          }
84  
85          return soapModels.toArray(new ResourceActionSoap[soapModels.size()]);
86      }
87  
88      public ResourceActionSoap() {
89      }
90  
91      public long getPrimaryKey() {
92          return _resourceActionId;
93      }
94  
95      public void setPrimaryKey(long pk) {
96          setResourceActionId(pk);
97      }
98  
99      public long getResourceActionId() {
100         return _resourceActionId;
101     }
102 
103     public void setResourceActionId(long resourceActionId) {
104         _resourceActionId = resourceActionId;
105     }
106 
107     public String getName() {
108         return _name;
109     }
110 
111     public void setName(String name) {
112         _name = name;
113     }
114 
115     public String getActionId() {
116         return _actionId;
117     }
118 
119     public void setActionId(String actionId) {
120         _actionId = actionId;
121     }
122 
123     public long getBitwiseValue() {
124         return _bitwiseValue;
125     }
126 
127     public void setBitwiseValue(long bitwiseValue) {
128         _bitwiseValue = bitwiseValue;
129     }
130 
131     private long _resourceActionId;
132     private String _name;
133     private String _actionId;
134     private long _bitwiseValue;
135 }