001
014
015 package com.liferay.portlet.shopping.model;
016
017 import java.io.Serializable;
018
019 import java.util.ArrayList;
020 import java.util.Date;
021 import java.util.List;
022
023
033 public class ShoppingCategorySoap implements Serializable {
034 public static ShoppingCategorySoap toSoapModel(ShoppingCategory model) {
035 ShoppingCategorySoap soapModel = new ShoppingCategorySoap();
036
037 soapModel.setCategoryId(model.getCategoryId());
038 soapModel.setGroupId(model.getGroupId());
039 soapModel.setCompanyId(model.getCompanyId());
040 soapModel.setUserId(model.getUserId());
041 soapModel.setUserName(model.getUserName());
042 soapModel.setCreateDate(model.getCreateDate());
043 soapModel.setModifiedDate(model.getModifiedDate());
044 soapModel.setParentCategoryId(model.getParentCategoryId());
045 soapModel.setName(model.getName());
046 soapModel.setDescription(model.getDescription());
047
048 return soapModel;
049 }
050
051 public static ShoppingCategorySoap[] toSoapModels(ShoppingCategory[] models) {
052 ShoppingCategorySoap[] soapModels = new ShoppingCategorySoap[models.length];
053
054 for (int i = 0; i < models.length; i++) {
055 soapModels[i] = toSoapModel(models[i]);
056 }
057
058 return soapModels;
059 }
060
061 public static ShoppingCategorySoap[][] toSoapModels(
062 ShoppingCategory[][] models) {
063 ShoppingCategorySoap[][] soapModels = null;
064
065 if (models.length > 0) {
066 soapModels = new ShoppingCategorySoap[models.length][models[0].length];
067 }
068 else {
069 soapModels = new ShoppingCategorySoap[0][0];
070 }
071
072 for (int i = 0; i < models.length; i++) {
073 soapModels[i] = toSoapModels(models[i]);
074 }
075
076 return soapModels;
077 }
078
079 public static ShoppingCategorySoap[] toSoapModels(
080 List<ShoppingCategory> models) {
081 List<ShoppingCategorySoap> soapModels = new ArrayList<ShoppingCategorySoap>(models.size());
082
083 for (ShoppingCategory model : models) {
084 soapModels.add(toSoapModel(model));
085 }
086
087 return soapModels.toArray(new ShoppingCategorySoap[soapModels.size()]);
088 }
089
090 public ShoppingCategorySoap() {
091 }
092
093 public long getPrimaryKey() {
094 return _categoryId;
095 }
096
097 public void setPrimaryKey(long pk) {
098 setCategoryId(pk);
099 }
100
101 public long getCategoryId() {
102 return _categoryId;
103 }
104
105 public void setCategoryId(long categoryId) {
106 _categoryId = categoryId;
107 }
108
109 public long getGroupId() {
110 return _groupId;
111 }
112
113 public void setGroupId(long groupId) {
114 _groupId = groupId;
115 }
116
117 public long getCompanyId() {
118 return _companyId;
119 }
120
121 public void setCompanyId(long companyId) {
122 _companyId = companyId;
123 }
124
125 public long getUserId() {
126 return _userId;
127 }
128
129 public void setUserId(long userId) {
130 _userId = userId;
131 }
132
133 public String getUserName() {
134 return _userName;
135 }
136
137 public void setUserName(String userName) {
138 _userName = userName;
139 }
140
141 public Date getCreateDate() {
142 return _createDate;
143 }
144
145 public void setCreateDate(Date createDate) {
146 _createDate = createDate;
147 }
148
149 public Date getModifiedDate() {
150 return _modifiedDate;
151 }
152
153 public void setModifiedDate(Date modifiedDate) {
154 _modifiedDate = modifiedDate;
155 }
156
157 public long getParentCategoryId() {
158 return _parentCategoryId;
159 }
160
161 public void setParentCategoryId(long parentCategoryId) {
162 _parentCategoryId = parentCategoryId;
163 }
164
165 public String getName() {
166 return _name;
167 }
168
169 public void setName(String name) {
170 _name = name;
171 }
172
173 public String getDescription() {
174 return _description;
175 }
176
177 public void setDescription(String description) {
178 _description = description;
179 }
180
181 private long _categoryId;
182 private long _groupId;
183 private long _companyId;
184 private long _userId;
185 private String _userName;
186 private Date _createDate;
187 private Date _modifiedDate;
188 private long _parentCategoryId;
189 private String _name;
190 private String _description;
191 }