001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class LayoutPrototypeWrapper implements LayoutPrototype,
032 ModelWrapper<LayoutPrototype> {
033 public LayoutPrototypeWrapper(LayoutPrototype layoutPrototype) {
034 _layoutPrototype = layoutPrototype;
035 }
036
037 public Class<?> getModelClass() {
038 return LayoutPrototype.class;
039 }
040
041 public String getModelClassName() {
042 return LayoutPrototype.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("layoutPrototypeId", getLayoutPrototypeId());
050 attributes.put("companyId", getCompanyId());
051 attributes.put("name", getName());
052 attributes.put("description", getDescription());
053 attributes.put("settings", getSettings());
054 attributes.put("active", getActive());
055
056 return attributes;
057 }
058
059 public void setModelAttributes(Map<String, Object> attributes) {
060 String uuid = (String)attributes.get("uuid");
061
062 if (uuid != null) {
063 setUuid(uuid);
064 }
065
066 Long layoutPrototypeId = (Long)attributes.get("layoutPrototypeId");
067
068 if (layoutPrototypeId != null) {
069 setLayoutPrototypeId(layoutPrototypeId);
070 }
071
072 Long companyId = (Long)attributes.get("companyId");
073
074 if (companyId != null) {
075 setCompanyId(companyId);
076 }
077
078 String name = (String)attributes.get("name");
079
080 if (name != null) {
081 setName(name);
082 }
083
084 String description = (String)attributes.get("description");
085
086 if (description != null) {
087 setDescription(description);
088 }
089
090 String settings = (String)attributes.get("settings");
091
092 if (settings != null) {
093 setSettings(settings);
094 }
095
096 Boolean active = (Boolean)attributes.get("active");
097
098 if (active != null) {
099 setActive(active);
100 }
101 }
102
103
108 public long getPrimaryKey() {
109 return _layoutPrototype.getPrimaryKey();
110 }
111
112
117 public void setPrimaryKey(long primaryKey) {
118 _layoutPrototype.setPrimaryKey(primaryKey);
119 }
120
121
126 public java.lang.String getUuid() {
127 return _layoutPrototype.getUuid();
128 }
129
130
135 public void setUuid(java.lang.String uuid) {
136 _layoutPrototype.setUuid(uuid);
137 }
138
139
144 public long getLayoutPrototypeId() {
145 return _layoutPrototype.getLayoutPrototypeId();
146 }
147
148
153 public void setLayoutPrototypeId(long layoutPrototypeId) {
154 _layoutPrototype.setLayoutPrototypeId(layoutPrototypeId);
155 }
156
157
162 public long getCompanyId() {
163 return _layoutPrototype.getCompanyId();
164 }
165
166
171 public void setCompanyId(long companyId) {
172 _layoutPrototype.setCompanyId(companyId);
173 }
174
175
180 public java.lang.String getName() {
181 return _layoutPrototype.getName();
182 }
183
184
190 public java.lang.String getName(java.util.Locale locale) {
191 return _layoutPrototype.getName(locale);
192 }
193
194
201 public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
202 return _layoutPrototype.getName(locale, useDefault);
203 }
204
205
211 public java.lang.String getName(java.lang.String languageId) {
212 return _layoutPrototype.getName(languageId);
213 }
214
215
222 public java.lang.String getName(java.lang.String languageId,
223 boolean useDefault) {
224 return _layoutPrototype.getName(languageId, useDefault);
225 }
226
227 public java.lang.String getNameCurrentLanguageId() {
228 return _layoutPrototype.getNameCurrentLanguageId();
229 }
230
231 public java.lang.String getNameCurrentValue() {
232 return _layoutPrototype.getNameCurrentValue();
233 }
234
235
240 public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
241 return _layoutPrototype.getNameMap();
242 }
243
244
249 public void setName(java.lang.String name) {
250 _layoutPrototype.setName(name);
251 }
252
253
259 public void setName(java.lang.String name, java.util.Locale locale) {
260 _layoutPrototype.setName(name, locale);
261 }
262
263
270 public void setName(java.lang.String name, java.util.Locale locale,
271 java.util.Locale defaultLocale) {
272 _layoutPrototype.setName(name, locale, defaultLocale);
273 }
274
275 public void setNameCurrentLanguageId(java.lang.String languageId) {
276 _layoutPrototype.setNameCurrentLanguageId(languageId);
277 }
278
279
284 public void setNameMap(
285 java.util.Map<java.util.Locale, java.lang.String> nameMap) {
286 _layoutPrototype.setNameMap(nameMap);
287 }
288
289
295 public void setNameMap(
296 java.util.Map<java.util.Locale, java.lang.String> nameMap,
297 java.util.Locale defaultLocale) {
298 _layoutPrototype.setNameMap(nameMap, defaultLocale);
299 }
300
301
306 public java.lang.String getDescription() {
307 return _layoutPrototype.getDescription();
308 }
309
310
315 public void setDescription(java.lang.String description) {
316 _layoutPrototype.setDescription(description);
317 }
318
319
324 public java.lang.String getSettings() {
325 return _layoutPrototype.getSettings();
326 }
327
328
333 public void setSettings(java.lang.String settings) {
334 _layoutPrototype.setSettings(settings);
335 }
336
337
342 public boolean getActive() {
343 return _layoutPrototype.getActive();
344 }
345
346
351 public boolean isActive() {
352 return _layoutPrototype.isActive();
353 }
354
355
360 public void setActive(boolean active) {
361 _layoutPrototype.setActive(active);
362 }
363
364 public boolean isNew() {
365 return _layoutPrototype.isNew();
366 }
367
368 public void setNew(boolean n) {
369 _layoutPrototype.setNew(n);
370 }
371
372 public boolean isCachedModel() {
373 return _layoutPrototype.isCachedModel();
374 }
375
376 public void setCachedModel(boolean cachedModel) {
377 _layoutPrototype.setCachedModel(cachedModel);
378 }
379
380 public boolean isEscapedModel() {
381 return _layoutPrototype.isEscapedModel();
382 }
383
384 public java.io.Serializable getPrimaryKeyObj() {
385 return _layoutPrototype.getPrimaryKeyObj();
386 }
387
388 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
389 _layoutPrototype.setPrimaryKeyObj(primaryKeyObj);
390 }
391
392 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
393 return _layoutPrototype.getExpandoBridge();
394 }
395
396 public void setExpandoBridgeAttributes(
397 com.liferay.portal.service.ServiceContext serviceContext) {
398 _layoutPrototype.setExpandoBridgeAttributes(serviceContext);
399 }
400
401 public void prepareLocalizedFieldsForImport(
402 java.util.Locale defaultImportLocale)
403 throws com.liferay.portal.LocaleException {
404 _layoutPrototype.prepareLocalizedFieldsForImport(defaultImportLocale);
405 }
406
407 @Override
408 public java.lang.Object clone() {
409 return new LayoutPrototypeWrapper((LayoutPrototype)_layoutPrototype.clone());
410 }
411
412 public int compareTo(
413 com.liferay.portal.model.LayoutPrototype layoutPrototype) {
414 return _layoutPrototype.compareTo(layoutPrototype);
415 }
416
417 @Override
418 public int hashCode() {
419 return _layoutPrototype.hashCode();
420 }
421
422 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutPrototype> toCacheModel() {
423 return _layoutPrototype.toCacheModel();
424 }
425
426 public com.liferay.portal.model.LayoutPrototype toEscapedModel() {
427 return new LayoutPrototypeWrapper(_layoutPrototype.toEscapedModel());
428 }
429
430 public com.liferay.portal.model.LayoutPrototype toUnescapedModel() {
431 return new LayoutPrototypeWrapper(_layoutPrototype.toUnescapedModel());
432 }
433
434 @Override
435 public java.lang.String toString() {
436 return _layoutPrototype.toString();
437 }
438
439 public java.lang.String toXmlString() {
440 return _layoutPrototype.toXmlString();
441 }
442
443 public void persist()
444 throws com.liferay.portal.kernel.exception.SystemException {
445 _layoutPrototype.persist();
446 }
447
448 public com.liferay.portal.model.Group getGroup()
449 throws com.liferay.portal.kernel.exception.PortalException,
450 com.liferay.portal.kernel.exception.SystemException {
451 return _layoutPrototype.getGroup();
452 }
453
454 public long getGroupId()
455 throws com.liferay.portal.kernel.exception.PortalException,
456 com.liferay.portal.kernel.exception.SystemException {
457 return _layoutPrototype.getGroupId();
458 }
459
460 public com.liferay.portal.model.Layout getLayout()
461 throws com.liferay.portal.kernel.exception.PortalException,
462 com.liferay.portal.kernel.exception.SystemException {
463 return _layoutPrototype.getLayout();
464 }
465
466 @Override
467 public boolean equals(Object obj) {
468 if (this == obj) {
469 return true;
470 }
471
472 if (!(obj instanceof LayoutPrototypeWrapper)) {
473 return false;
474 }
475
476 LayoutPrototypeWrapper layoutPrototypeWrapper = (LayoutPrototypeWrapper)obj;
477
478 if (Validator.equals(_layoutPrototype,
479 layoutPrototypeWrapper._layoutPrototype)) {
480 return true;
481 }
482
483 return false;
484 }
485
486
489 public LayoutPrototype getWrappedLayoutPrototype() {
490 return _layoutPrototype;
491 }
492
493 public LayoutPrototype getWrappedModel() {
494 return _layoutPrototype;
495 }
496
497 public void resetOriginalValues() {
498 _layoutPrototype.resetOriginalValues();
499 }
500
501 private LayoutPrototype _layoutPrototype;
502 }