001
014
015 package com.liferay.portal.model;
016
017 import java.util.Date;
018 import java.util.HashMap;
019 import java.util.Map;
020
021
030 public class LockWrapper implements Lock, ModelWrapper<Lock> {
031 public LockWrapper(Lock lock) {
032 _lock = lock;
033 }
034
035 public Class<?> getModelClass() {
036 return Lock.class;
037 }
038
039 public String getModelClassName() {
040 return Lock.class.getName();
041 }
042
043 public Map<String, Object> getModelAttributes() {
044 Map<String, Object> attributes = new HashMap<String, Object>();
045
046 attributes.put("uuid", getUuid());
047 attributes.put("lockId", getLockId());
048 attributes.put("companyId", getCompanyId());
049 attributes.put("userId", getUserId());
050 attributes.put("userName", getUserName());
051 attributes.put("createDate", getCreateDate());
052 attributes.put("className", getClassName());
053 attributes.put("key", getKey());
054 attributes.put("owner", getOwner());
055 attributes.put("inheritable", getInheritable());
056 attributes.put("expirationDate", getExpirationDate());
057
058 return attributes;
059 }
060
061 public void setModelAttributes(Map<String, Object> attributes) {
062 String uuid = (String)attributes.get("uuid");
063
064 if (uuid != null) {
065 setUuid(uuid);
066 }
067
068 Long lockId = (Long)attributes.get("lockId");
069
070 if (lockId != null) {
071 setLockId(lockId);
072 }
073
074 Long companyId = (Long)attributes.get("companyId");
075
076 if (companyId != null) {
077 setCompanyId(companyId);
078 }
079
080 Long userId = (Long)attributes.get("userId");
081
082 if (userId != null) {
083 setUserId(userId);
084 }
085
086 String userName = (String)attributes.get("userName");
087
088 if (userName != null) {
089 setUserName(userName);
090 }
091
092 Date createDate = (Date)attributes.get("createDate");
093
094 if (createDate != null) {
095 setCreateDate(createDate);
096 }
097
098 String className = (String)attributes.get("className");
099
100 if (className != null) {
101 setClassName(className);
102 }
103
104 String key = (String)attributes.get("key");
105
106 if (key != null) {
107 setKey(key);
108 }
109
110 String owner = (String)attributes.get("owner");
111
112 if (owner != null) {
113 setOwner(owner);
114 }
115
116 Boolean inheritable = (Boolean)attributes.get("inheritable");
117
118 if (inheritable != null) {
119 setInheritable(inheritable);
120 }
121
122 Date expirationDate = (Date)attributes.get("expirationDate");
123
124 if (expirationDate != null) {
125 setExpirationDate(expirationDate);
126 }
127 }
128
129
134 public long getPrimaryKey() {
135 return _lock.getPrimaryKey();
136 }
137
138
143 public void setPrimaryKey(long primaryKey) {
144 _lock.setPrimaryKey(primaryKey);
145 }
146
147
152 public java.lang.String getUuid() {
153 return _lock.getUuid();
154 }
155
156
161 public void setUuid(java.lang.String uuid) {
162 _lock.setUuid(uuid);
163 }
164
165
170 public long getLockId() {
171 return _lock.getLockId();
172 }
173
174
179 public void setLockId(long lockId) {
180 _lock.setLockId(lockId);
181 }
182
183
188 public long getCompanyId() {
189 return _lock.getCompanyId();
190 }
191
192
197 public void setCompanyId(long companyId) {
198 _lock.setCompanyId(companyId);
199 }
200
201
206 public long getUserId() {
207 return _lock.getUserId();
208 }
209
210
215 public void setUserId(long userId) {
216 _lock.setUserId(userId);
217 }
218
219
225 public java.lang.String getUserUuid()
226 throws com.liferay.portal.kernel.exception.SystemException {
227 return _lock.getUserUuid();
228 }
229
230
235 public void setUserUuid(java.lang.String userUuid) {
236 _lock.setUserUuid(userUuid);
237 }
238
239
244 public java.lang.String getUserName() {
245 return _lock.getUserName();
246 }
247
248
253 public void setUserName(java.lang.String userName) {
254 _lock.setUserName(userName);
255 }
256
257
262 public java.util.Date getCreateDate() {
263 return _lock.getCreateDate();
264 }
265
266
271 public void setCreateDate(java.util.Date createDate) {
272 _lock.setCreateDate(createDate);
273 }
274
275
280 public java.lang.String getClassName() {
281 return _lock.getClassName();
282 }
283
284
289 public void setClassName(java.lang.String className) {
290 _lock.setClassName(className);
291 }
292
293
298 public java.lang.String getKey() {
299 return _lock.getKey();
300 }
301
302
307 public void setKey(java.lang.String key) {
308 _lock.setKey(key);
309 }
310
311
316 public java.lang.String getOwner() {
317 return _lock.getOwner();
318 }
319
320
325 public void setOwner(java.lang.String owner) {
326 _lock.setOwner(owner);
327 }
328
329
334 public boolean getInheritable() {
335 return _lock.getInheritable();
336 }
337
338
343 public boolean isInheritable() {
344 return _lock.isInheritable();
345 }
346
347
352 public void setInheritable(boolean inheritable) {
353 _lock.setInheritable(inheritable);
354 }
355
356
361 public java.util.Date getExpirationDate() {
362 return _lock.getExpirationDate();
363 }
364
365
370 public void setExpirationDate(java.util.Date expirationDate) {
371 _lock.setExpirationDate(expirationDate);
372 }
373
374 public boolean isNew() {
375 return _lock.isNew();
376 }
377
378 public void setNew(boolean n) {
379 _lock.setNew(n);
380 }
381
382 public boolean isCachedModel() {
383 return _lock.isCachedModel();
384 }
385
386 public void setCachedModel(boolean cachedModel) {
387 _lock.setCachedModel(cachedModel);
388 }
389
390 public boolean isEscapedModel() {
391 return _lock.isEscapedModel();
392 }
393
394 public java.io.Serializable getPrimaryKeyObj() {
395 return _lock.getPrimaryKeyObj();
396 }
397
398 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
399 _lock.setPrimaryKeyObj(primaryKeyObj);
400 }
401
402 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
403 return _lock.getExpandoBridge();
404 }
405
406 public void setExpandoBridgeAttributes(
407 com.liferay.portal.service.ServiceContext serviceContext) {
408 _lock.setExpandoBridgeAttributes(serviceContext);
409 }
410
411 @Override
412 public java.lang.Object clone() {
413 return new LockWrapper((Lock)_lock.clone());
414 }
415
416 public int compareTo(com.liferay.portal.model.Lock lock) {
417 return _lock.compareTo(lock);
418 }
419
420 @Override
421 public int hashCode() {
422 return _lock.hashCode();
423 }
424
425 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Lock> toCacheModel() {
426 return _lock.toCacheModel();
427 }
428
429 public com.liferay.portal.model.Lock toEscapedModel() {
430 return new LockWrapper(_lock.toEscapedModel());
431 }
432
433 public com.liferay.portal.model.Lock toUnescapedModel() {
434 return new LockWrapper(_lock.toUnescapedModel());
435 }
436
437 @Override
438 public java.lang.String toString() {
439 return _lock.toString();
440 }
441
442 public java.lang.String toXmlString() {
443 return _lock.toXmlString();
444 }
445
446 public void persist()
447 throws com.liferay.portal.kernel.exception.SystemException {
448 _lock.persist();
449 }
450
451 public long getExpirationTime() {
452 return _lock.getExpirationTime();
453 }
454
455 public boolean isExpired() {
456 return _lock.isExpired();
457 }
458
459 public boolean isNeverExpires() {
460 return _lock.isNeverExpires();
461 }
462
463
466 public Lock getWrappedLock() {
467 return _lock;
468 }
469
470 public Lock getWrappedModel() {
471 return _lock;
472 }
473
474 public void resetOriginalValues() {
475 _lock.resetOriginalValues();
476 }
477
478 private Lock _lock;
479 }