001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.Date;
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class LockWrapper implements Lock, ModelWrapper<Lock> {
033 public LockWrapper(Lock lock) {
034 _lock = lock;
035 }
036
037 public Class<?> getModelClass() {
038 return Lock.class;
039 }
040
041 public String getModelClassName() {
042 return Lock.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("uuid", getUuid());
049 attributes.put("lockId", getLockId());
050 attributes.put("companyId", getCompanyId());
051 attributes.put("userId", getUserId());
052 attributes.put("userName", getUserName());
053 attributes.put("createDate", getCreateDate());
054 attributes.put("className", getClassName());
055 attributes.put("key", getKey());
056 attributes.put("owner", getOwner());
057 attributes.put("inheritable", getInheritable());
058 attributes.put("expirationDate", getExpirationDate());
059
060 return attributes;
061 }
062
063 public void setModelAttributes(Map<String, Object> attributes) {
064 String uuid = (String)attributes.get("uuid");
065
066 if (uuid != null) {
067 setUuid(uuid);
068 }
069
070 Long lockId = (Long)attributes.get("lockId");
071
072 if (lockId != null) {
073 setLockId(lockId);
074 }
075
076 Long companyId = (Long)attributes.get("companyId");
077
078 if (companyId != null) {
079 setCompanyId(companyId);
080 }
081
082 Long userId = (Long)attributes.get("userId");
083
084 if (userId != null) {
085 setUserId(userId);
086 }
087
088 String userName = (String)attributes.get("userName");
089
090 if (userName != null) {
091 setUserName(userName);
092 }
093
094 Date createDate = (Date)attributes.get("createDate");
095
096 if (createDate != null) {
097 setCreateDate(createDate);
098 }
099
100 String className = (String)attributes.get("className");
101
102 if (className != null) {
103 setClassName(className);
104 }
105
106 String key = (String)attributes.get("key");
107
108 if (key != null) {
109 setKey(key);
110 }
111
112 String owner = (String)attributes.get("owner");
113
114 if (owner != null) {
115 setOwner(owner);
116 }
117
118 Boolean inheritable = (Boolean)attributes.get("inheritable");
119
120 if (inheritable != null) {
121 setInheritable(inheritable);
122 }
123
124 Date expirationDate = (Date)attributes.get("expirationDate");
125
126 if (expirationDate != null) {
127 setExpirationDate(expirationDate);
128 }
129 }
130
131
136 public long getPrimaryKey() {
137 return _lock.getPrimaryKey();
138 }
139
140
145 public void setPrimaryKey(long primaryKey) {
146 _lock.setPrimaryKey(primaryKey);
147 }
148
149
154 public java.lang.String getUuid() {
155 return _lock.getUuid();
156 }
157
158
163 public void setUuid(java.lang.String uuid) {
164 _lock.setUuid(uuid);
165 }
166
167
172 public long getLockId() {
173 return _lock.getLockId();
174 }
175
176
181 public void setLockId(long lockId) {
182 _lock.setLockId(lockId);
183 }
184
185
190 public long getCompanyId() {
191 return _lock.getCompanyId();
192 }
193
194
199 public void setCompanyId(long companyId) {
200 _lock.setCompanyId(companyId);
201 }
202
203
208 public long getUserId() {
209 return _lock.getUserId();
210 }
211
212
217 public void setUserId(long userId) {
218 _lock.setUserId(userId);
219 }
220
221
227 public java.lang.String getUserUuid()
228 throws com.liferay.portal.kernel.exception.SystemException {
229 return _lock.getUserUuid();
230 }
231
232
237 public void setUserUuid(java.lang.String userUuid) {
238 _lock.setUserUuid(userUuid);
239 }
240
241
246 public java.lang.String getUserName() {
247 return _lock.getUserName();
248 }
249
250
255 public void setUserName(java.lang.String userName) {
256 _lock.setUserName(userName);
257 }
258
259
264 public java.util.Date getCreateDate() {
265 return _lock.getCreateDate();
266 }
267
268
273 public void setCreateDate(java.util.Date createDate) {
274 _lock.setCreateDate(createDate);
275 }
276
277
282 public java.lang.String getClassName() {
283 return _lock.getClassName();
284 }
285
286
291 public void setClassName(java.lang.String className) {
292 _lock.setClassName(className);
293 }
294
295
300 public java.lang.String getKey() {
301 return _lock.getKey();
302 }
303
304
309 public void setKey(java.lang.String key) {
310 _lock.setKey(key);
311 }
312
313
318 public java.lang.String getOwner() {
319 return _lock.getOwner();
320 }
321
322
327 public void setOwner(java.lang.String owner) {
328 _lock.setOwner(owner);
329 }
330
331
336 public boolean getInheritable() {
337 return _lock.getInheritable();
338 }
339
340
345 public boolean isInheritable() {
346 return _lock.isInheritable();
347 }
348
349
354 public void setInheritable(boolean inheritable) {
355 _lock.setInheritable(inheritable);
356 }
357
358
363 public java.util.Date getExpirationDate() {
364 return _lock.getExpirationDate();
365 }
366
367
372 public void setExpirationDate(java.util.Date expirationDate) {
373 _lock.setExpirationDate(expirationDate);
374 }
375
376 public boolean isNew() {
377 return _lock.isNew();
378 }
379
380 public void setNew(boolean n) {
381 _lock.setNew(n);
382 }
383
384 public boolean isCachedModel() {
385 return _lock.isCachedModel();
386 }
387
388 public void setCachedModel(boolean cachedModel) {
389 _lock.setCachedModel(cachedModel);
390 }
391
392 public boolean isEscapedModel() {
393 return _lock.isEscapedModel();
394 }
395
396 public java.io.Serializable getPrimaryKeyObj() {
397 return _lock.getPrimaryKeyObj();
398 }
399
400 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
401 _lock.setPrimaryKeyObj(primaryKeyObj);
402 }
403
404 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
405 return _lock.getExpandoBridge();
406 }
407
408 public void setExpandoBridgeAttributes(
409 com.liferay.portal.service.ServiceContext serviceContext) {
410 _lock.setExpandoBridgeAttributes(serviceContext);
411 }
412
413 @Override
414 public java.lang.Object clone() {
415 return new LockWrapper((Lock)_lock.clone());
416 }
417
418 public int compareTo(com.liferay.portal.model.Lock lock) {
419 return _lock.compareTo(lock);
420 }
421
422 @Override
423 public int hashCode() {
424 return _lock.hashCode();
425 }
426
427 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Lock> toCacheModel() {
428 return _lock.toCacheModel();
429 }
430
431 public com.liferay.portal.model.Lock toEscapedModel() {
432 return new LockWrapper(_lock.toEscapedModel());
433 }
434
435 public com.liferay.portal.model.Lock toUnescapedModel() {
436 return new LockWrapper(_lock.toUnescapedModel());
437 }
438
439 @Override
440 public java.lang.String toString() {
441 return _lock.toString();
442 }
443
444 public java.lang.String toXmlString() {
445 return _lock.toXmlString();
446 }
447
448 public void persist()
449 throws com.liferay.portal.kernel.exception.SystemException {
450 _lock.persist();
451 }
452
453 public long getExpirationTime() {
454 return _lock.getExpirationTime();
455 }
456
457 public boolean isExpired() {
458 return _lock.isExpired();
459 }
460
461 public boolean isNeverExpires() {
462 return _lock.isNeverExpires();
463 }
464
465 @Override
466 public boolean equals(Object obj) {
467 if (this == obj) {
468 return true;
469 }
470
471 if (!(obj instanceof LockWrapper)) {
472 return false;
473 }
474
475 LockWrapper lockWrapper = (LockWrapper)obj;
476
477 if (Validator.equals(_lock, lockWrapper._lock)) {
478 return true;
479 }
480
481 return false;
482 }
483
484
487 public Lock getWrappedLock() {
488 return _lock;
489 }
490
491 public Lock getWrappedModel() {
492 return _lock;
493 }
494
495 public void resetOriginalValues() {
496 _lock.resetOriginalValues();
497 }
498
499 private Lock _lock;
500 }