1
19
20 package com.liferay.portlet.shopping.model;
21
22 import java.io.Serializable;
23
24 import java.util.ArrayList;
25 import java.util.Date;
26 import java.util.List;
27
28
46 public class ShoppingCategorySoap implements Serializable {
47 public static ShoppingCategorySoap toSoapModel(ShoppingCategory model) {
48 ShoppingCategorySoap soapModel = new ShoppingCategorySoap();
49
50 soapModel.setCategoryId(model.getCategoryId());
51 soapModel.setGroupId(model.getGroupId());
52 soapModel.setCompanyId(model.getCompanyId());
53 soapModel.setUserId(model.getUserId());
54 soapModel.setUserName(model.getUserName());
55 soapModel.setCreateDate(model.getCreateDate());
56 soapModel.setModifiedDate(model.getModifiedDate());
57 soapModel.setParentCategoryId(model.getParentCategoryId());
58 soapModel.setName(model.getName());
59 soapModel.setDescription(model.getDescription());
60
61 return soapModel;
62 }
63
64 public static ShoppingCategorySoap[] toSoapModels(ShoppingCategory[] models) {
65 ShoppingCategorySoap[] soapModels = new ShoppingCategorySoap[models.length];
66
67 for (int i = 0; i < models.length; i++) {
68 soapModels[i] = toSoapModel(models[i]);
69 }
70
71 return soapModels;
72 }
73
74 public static ShoppingCategorySoap[][] toSoapModels(
75 ShoppingCategory[][] models) {
76 ShoppingCategorySoap[][] soapModels = null;
77
78 if (models.length > 0) {
79 soapModels = new ShoppingCategorySoap[models.length][models[0].length];
80 }
81 else {
82 soapModels = new ShoppingCategorySoap[0][0];
83 }
84
85 for (int i = 0; i < models.length; i++) {
86 soapModels[i] = toSoapModels(models[i]);
87 }
88
89 return soapModels;
90 }
91
92 public static ShoppingCategorySoap[] toSoapModels(
93 List<ShoppingCategory> models) {
94 List<ShoppingCategorySoap> soapModels = new ArrayList<ShoppingCategorySoap>(models.size());
95
96 for (ShoppingCategory model : models) {
97 soapModels.add(toSoapModel(model));
98 }
99
100 return soapModels.toArray(new ShoppingCategorySoap[soapModels.size()]);
101 }
102
103 public ShoppingCategorySoap() {
104 }
105
106 public long getPrimaryKey() {
107 return _categoryId;
108 }
109
110 public void setPrimaryKey(long pk) {
111 setCategoryId(pk);
112 }
113
114 public long getCategoryId() {
115 return _categoryId;
116 }
117
118 public void setCategoryId(long categoryId) {
119 _categoryId = categoryId;
120 }
121
122 public long getGroupId() {
123 return _groupId;
124 }
125
126 public void setGroupId(long groupId) {
127 _groupId = groupId;
128 }
129
130 public long getCompanyId() {
131 return _companyId;
132 }
133
134 public void setCompanyId(long companyId) {
135 _companyId = companyId;
136 }
137
138 public long getUserId() {
139 return _userId;
140 }
141
142 public void setUserId(long userId) {
143 _userId = userId;
144 }
145
146 public String getUserName() {
147 return _userName;
148 }
149
150 public void setUserName(String userName) {
151 _userName = userName;
152 }
153
154 public Date getCreateDate() {
155 return _createDate;
156 }
157
158 public void setCreateDate(Date createDate) {
159 _createDate = createDate;
160 }
161
162 public Date getModifiedDate() {
163 return _modifiedDate;
164 }
165
166 public void setModifiedDate(Date modifiedDate) {
167 _modifiedDate = modifiedDate;
168 }
169
170 public long getParentCategoryId() {
171 return _parentCategoryId;
172 }
173
174 public void setParentCategoryId(long parentCategoryId) {
175 _parentCategoryId = parentCategoryId;
176 }
177
178 public String getName() {
179 return _name;
180 }
181
182 public void setName(String name) {
183 _name = name;
184 }
185
186 public String getDescription() {
187 return _description;
188 }
189
190 public void setDescription(String description) {
191 _description = description;
192 }
193
194 private long _categoryId;
195 private long _groupId;
196 private long _companyId;
197 private long _userId;
198 private String _userName;
199 private Date _createDate;
200 private Date _modifiedDate;
201 private long _parentCategoryId;
202 private String _name;
203 private String _description;
204 }