001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.Date;
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 public class AssetTagWrapper implements AssetTag, ModelWrapper<AssetTag> {
034 public AssetTagWrapper(AssetTag assetTag) {
035 _assetTag = assetTag;
036 }
037
038 public Class<?> getModelClass() {
039 return AssetTag.class;
040 }
041
042 public String getModelClassName() {
043 return AssetTag.class.getName();
044 }
045
046 public Map<String, Object> getModelAttributes() {
047 Map<String, Object> attributes = new HashMap<String, Object>();
048
049 attributes.put("tagId", getTagId());
050 attributes.put("groupId", getGroupId());
051 attributes.put("companyId", getCompanyId());
052 attributes.put("userId", getUserId());
053 attributes.put("userName", getUserName());
054 attributes.put("createDate", getCreateDate());
055 attributes.put("modifiedDate", getModifiedDate());
056 attributes.put("name", getName());
057 attributes.put("assetCount", getAssetCount());
058
059 return attributes;
060 }
061
062 public void setModelAttributes(Map<String, Object> attributes) {
063 Long tagId = (Long)attributes.get("tagId");
064
065 if (tagId != null) {
066 setTagId(tagId);
067 }
068
069 Long groupId = (Long)attributes.get("groupId");
070
071 if (groupId != null) {
072 setGroupId(groupId);
073 }
074
075 Long companyId = (Long)attributes.get("companyId");
076
077 if (companyId != null) {
078 setCompanyId(companyId);
079 }
080
081 Long userId = (Long)attributes.get("userId");
082
083 if (userId != null) {
084 setUserId(userId);
085 }
086
087 String userName = (String)attributes.get("userName");
088
089 if (userName != null) {
090 setUserName(userName);
091 }
092
093 Date createDate = (Date)attributes.get("createDate");
094
095 if (createDate != null) {
096 setCreateDate(createDate);
097 }
098
099 Date modifiedDate = (Date)attributes.get("modifiedDate");
100
101 if (modifiedDate != null) {
102 setModifiedDate(modifiedDate);
103 }
104
105 String name = (String)attributes.get("name");
106
107 if (name != null) {
108 setName(name);
109 }
110
111 Integer assetCount = (Integer)attributes.get("assetCount");
112
113 if (assetCount != null) {
114 setAssetCount(assetCount);
115 }
116 }
117
118
123 public long getPrimaryKey() {
124 return _assetTag.getPrimaryKey();
125 }
126
127
132 public void setPrimaryKey(long primaryKey) {
133 _assetTag.setPrimaryKey(primaryKey);
134 }
135
136
141 public long getTagId() {
142 return _assetTag.getTagId();
143 }
144
145
150 public void setTagId(long tagId) {
151 _assetTag.setTagId(tagId);
152 }
153
154
159 public long getGroupId() {
160 return _assetTag.getGroupId();
161 }
162
163
168 public void setGroupId(long groupId) {
169 _assetTag.setGroupId(groupId);
170 }
171
172
177 public long getCompanyId() {
178 return _assetTag.getCompanyId();
179 }
180
181
186 public void setCompanyId(long companyId) {
187 _assetTag.setCompanyId(companyId);
188 }
189
190
195 public long getUserId() {
196 return _assetTag.getUserId();
197 }
198
199
204 public void setUserId(long userId) {
205 _assetTag.setUserId(userId);
206 }
207
208
214 public java.lang.String getUserUuid()
215 throws com.liferay.portal.kernel.exception.SystemException {
216 return _assetTag.getUserUuid();
217 }
218
219
224 public void setUserUuid(java.lang.String userUuid) {
225 _assetTag.setUserUuid(userUuid);
226 }
227
228
233 public java.lang.String getUserName() {
234 return _assetTag.getUserName();
235 }
236
237
242 public void setUserName(java.lang.String userName) {
243 _assetTag.setUserName(userName);
244 }
245
246
251 public java.util.Date getCreateDate() {
252 return _assetTag.getCreateDate();
253 }
254
255
260 public void setCreateDate(java.util.Date createDate) {
261 _assetTag.setCreateDate(createDate);
262 }
263
264
269 public java.util.Date getModifiedDate() {
270 return _assetTag.getModifiedDate();
271 }
272
273
278 public void setModifiedDate(java.util.Date modifiedDate) {
279 _assetTag.setModifiedDate(modifiedDate);
280 }
281
282
287 public java.lang.String getName() {
288 return _assetTag.getName();
289 }
290
291
296 public void setName(java.lang.String name) {
297 _assetTag.setName(name);
298 }
299
300
305 public int getAssetCount() {
306 return _assetTag.getAssetCount();
307 }
308
309
314 public void setAssetCount(int assetCount) {
315 _assetTag.setAssetCount(assetCount);
316 }
317
318 public boolean isNew() {
319 return _assetTag.isNew();
320 }
321
322 public void setNew(boolean n) {
323 _assetTag.setNew(n);
324 }
325
326 public boolean isCachedModel() {
327 return _assetTag.isCachedModel();
328 }
329
330 public void setCachedModel(boolean cachedModel) {
331 _assetTag.setCachedModel(cachedModel);
332 }
333
334 public boolean isEscapedModel() {
335 return _assetTag.isEscapedModel();
336 }
337
338 public java.io.Serializable getPrimaryKeyObj() {
339 return _assetTag.getPrimaryKeyObj();
340 }
341
342 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
343 _assetTag.setPrimaryKeyObj(primaryKeyObj);
344 }
345
346 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
347 return _assetTag.getExpandoBridge();
348 }
349
350 public void setExpandoBridgeAttributes(
351 com.liferay.portal.service.ServiceContext serviceContext) {
352 _assetTag.setExpandoBridgeAttributes(serviceContext);
353 }
354
355 @Override
356 public java.lang.Object clone() {
357 return new AssetTagWrapper((AssetTag)_assetTag.clone());
358 }
359
360 public int compareTo(com.liferay.portlet.asset.model.AssetTag assetTag) {
361 return _assetTag.compareTo(assetTag);
362 }
363
364 @Override
365 public int hashCode() {
366 return _assetTag.hashCode();
367 }
368
369 public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetTag> toCacheModel() {
370 return _assetTag.toCacheModel();
371 }
372
373 public com.liferay.portlet.asset.model.AssetTag toEscapedModel() {
374 return new AssetTagWrapper(_assetTag.toEscapedModel());
375 }
376
377 public com.liferay.portlet.asset.model.AssetTag toUnescapedModel() {
378 return new AssetTagWrapper(_assetTag.toUnescapedModel());
379 }
380
381 @Override
382 public java.lang.String toString() {
383 return _assetTag.toString();
384 }
385
386 public java.lang.String toXmlString() {
387 return _assetTag.toXmlString();
388 }
389
390 public void persist()
391 throws com.liferay.portal.kernel.exception.SystemException {
392 _assetTag.persist();
393 }
394
395 @Override
396 public boolean equals(Object obj) {
397 if (this == obj) {
398 return true;
399 }
400
401 if (!(obj instanceof AssetTagWrapper)) {
402 return false;
403 }
404
405 AssetTagWrapper assetTagWrapper = (AssetTagWrapper)obj;
406
407 if (Validator.equals(_assetTag, assetTagWrapper._assetTag)) {
408 return true;
409 }
410
411 return false;
412 }
413
414
417 public AssetTag getWrappedAssetTag() {
418 return _assetTag;
419 }
420
421 public AssetTag getWrappedModel() {
422 return _assetTag;
423 }
424
425 public void resetOriginalValues() {
426 _assetTag.resetOriginalValues();
427 }
428
429 private AssetTag _assetTag;
430 }