001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.lar.StagedModelType;
020    import com.liferay.portal.kernel.util.Validator;
021    
022    import java.util.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link LayoutSetPrototype}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see LayoutSetPrototype
033     * @generated
034     */
035    @ProviderType
036    public class LayoutSetPrototypeWrapper implements LayoutSetPrototype,
037            ModelWrapper<LayoutSetPrototype> {
038            public LayoutSetPrototypeWrapper(LayoutSetPrototype layoutSetPrototype) {
039                    _layoutSetPrototype = layoutSetPrototype;
040            }
041    
042            @Override
043            public Class<?> getModelClass() {
044                    return LayoutSetPrototype.class;
045            }
046    
047            @Override
048            public String getModelClassName() {
049                    return LayoutSetPrototype.class.getName();
050            }
051    
052            @Override
053            public Map<String, Object> getModelAttributes() {
054                    Map<String, Object> attributes = new HashMap<String, Object>();
055    
056                    attributes.put("uuid", getUuid());
057                    attributes.put("layoutSetPrototypeId", getLayoutSetPrototypeId());
058                    attributes.put("companyId", getCompanyId());
059                    attributes.put("userId", getUserId());
060                    attributes.put("userName", getUserName());
061                    attributes.put("createDate", getCreateDate());
062                    attributes.put("modifiedDate", getModifiedDate());
063                    attributes.put("name", getName());
064                    attributes.put("description", getDescription());
065                    attributes.put("settings", getSettings());
066                    attributes.put("active", getActive());
067    
068                    return attributes;
069            }
070    
071            @Override
072            public void setModelAttributes(Map<String, Object> attributes) {
073                    String uuid = (String)attributes.get("uuid");
074    
075                    if (uuid != null) {
076                            setUuid(uuid);
077                    }
078    
079                    Long layoutSetPrototypeId = (Long)attributes.get("layoutSetPrototypeId");
080    
081                    if (layoutSetPrototypeId != null) {
082                            setLayoutSetPrototypeId(layoutSetPrototypeId);
083                    }
084    
085                    Long companyId = (Long)attributes.get("companyId");
086    
087                    if (companyId != null) {
088                            setCompanyId(companyId);
089                    }
090    
091                    Long userId = (Long)attributes.get("userId");
092    
093                    if (userId != null) {
094                            setUserId(userId);
095                    }
096    
097                    String userName = (String)attributes.get("userName");
098    
099                    if (userName != null) {
100                            setUserName(userName);
101                    }
102    
103                    Date createDate = (Date)attributes.get("createDate");
104    
105                    if (createDate != null) {
106                            setCreateDate(createDate);
107                    }
108    
109                    Date modifiedDate = (Date)attributes.get("modifiedDate");
110    
111                    if (modifiedDate != null) {
112                            setModifiedDate(modifiedDate);
113                    }
114    
115                    String name = (String)attributes.get("name");
116    
117                    if (name != null) {
118                            setName(name);
119                    }
120    
121                    String description = (String)attributes.get("description");
122    
123                    if (description != null) {
124                            setDescription(description);
125                    }
126    
127                    String settings = (String)attributes.get("settings");
128    
129                    if (settings != null) {
130                            setSettings(settings);
131                    }
132    
133                    Boolean active = (Boolean)attributes.get("active");
134    
135                    if (active != null) {
136                            setActive(active);
137                    }
138            }
139    
140            /**
141            * Returns the primary key of this layout set prototype.
142            *
143            * @return the primary key of this layout set prototype
144            */
145            @Override
146            public long getPrimaryKey() {
147                    return _layoutSetPrototype.getPrimaryKey();
148            }
149    
150            /**
151            * Sets the primary key of this layout set prototype.
152            *
153            * @param primaryKey the primary key of this layout set prototype
154            */
155            @Override
156            public void setPrimaryKey(long primaryKey) {
157                    _layoutSetPrototype.setPrimaryKey(primaryKey);
158            }
159    
160            /**
161            * Returns the uuid of this layout set prototype.
162            *
163            * @return the uuid of this layout set prototype
164            */
165            @Override
166            public java.lang.String getUuid() {
167                    return _layoutSetPrototype.getUuid();
168            }
169    
170            /**
171            * Sets the uuid of this layout set prototype.
172            *
173            * @param uuid the uuid of this layout set prototype
174            */
175            @Override
176            public void setUuid(java.lang.String uuid) {
177                    _layoutSetPrototype.setUuid(uuid);
178            }
179    
180            /**
181            * Returns the layout set prototype ID of this layout set prototype.
182            *
183            * @return the layout set prototype ID of this layout set prototype
184            */
185            @Override
186            public long getLayoutSetPrototypeId() {
187                    return _layoutSetPrototype.getLayoutSetPrototypeId();
188            }
189    
190            /**
191            * Sets the layout set prototype ID of this layout set prototype.
192            *
193            * @param layoutSetPrototypeId the layout set prototype ID of this layout set prototype
194            */
195            @Override
196            public void setLayoutSetPrototypeId(long layoutSetPrototypeId) {
197                    _layoutSetPrototype.setLayoutSetPrototypeId(layoutSetPrototypeId);
198            }
199    
200            /**
201            * Returns the company ID of this layout set prototype.
202            *
203            * @return the company ID of this layout set prototype
204            */
205            @Override
206            public long getCompanyId() {
207                    return _layoutSetPrototype.getCompanyId();
208            }
209    
210            /**
211            * Sets the company ID of this layout set prototype.
212            *
213            * @param companyId the company ID of this layout set prototype
214            */
215            @Override
216            public void setCompanyId(long companyId) {
217                    _layoutSetPrototype.setCompanyId(companyId);
218            }
219    
220            /**
221            * Returns the user ID of this layout set prototype.
222            *
223            * @return the user ID of this layout set prototype
224            */
225            @Override
226            public long getUserId() {
227                    return _layoutSetPrototype.getUserId();
228            }
229    
230            /**
231            * Sets the user ID of this layout set prototype.
232            *
233            * @param userId the user ID of this layout set prototype
234            */
235            @Override
236            public void setUserId(long userId) {
237                    _layoutSetPrototype.setUserId(userId);
238            }
239    
240            /**
241            * Returns the user uuid of this layout set prototype.
242            *
243            * @return the user uuid of this layout set prototype
244            * @throws SystemException if a system exception occurred
245            */
246            @Override
247            public java.lang.String getUserUuid()
248                    throws com.liferay.portal.kernel.exception.SystemException {
249                    return _layoutSetPrototype.getUserUuid();
250            }
251    
252            /**
253            * Sets the user uuid of this layout set prototype.
254            *
255            * @param userUuid the user uuid of this layout set prototype
256            */
257            @Override
258            public void setUserUuid(java.lang.String userUuid) {
259                    _layoutSetPrototype.setUserUuid(userUuid);
260            }
261    
262            /**
263            * Returns the user name of this layout set prototype.
264            *
265            * @return the user name of this layout set prototype
266            */
267            @Override
268            public java.lang.String getUserName() {
269                    return _layoutSetPrototype.getUserName();
270            }
271    
272            /**
273            * Sets the user name of this layout set prototype.
274            *
275            * @param userName the user name of this layout set prototype
276            */
277            @Override
278            public void setUserName(java.lang.String userName) {
279                    _layoutSetPrototype.setUserName(userName);
280            }
281    
282            /**
283            * Returns the create date of this layout set prototype.
284            *
285            * @return the create date of this layout set prototype
286            */
287            @Override
288            public java.util.Date getCreateDate() {
289                    return _layoutSetPrototype.getCreateDate();
290            }
291    
292            /**
293            * Sets the create date of this layout set prototype.
294            *
295            * @param createDate the create date of this layout set prototype
296            */
297            @Override
298            public void setCreateDate(java.util.Date createDate) {
299                    _layoutSetPrototype.setCreateDate(createDate);
300            }
301    
302            /**
303            * Returns the modified date of this layout set prototype.
304            *
305            * @return the modified date of this layout set prototype
306            */
307            @Override
308            public java.util.Date getModifiedDate() {
309                    return _layoutSetPrototype.getModifiedDate();
310            }
311    
312            /**
313            * Sets the modified date of this layout set prototype.
314            *
315            * @param modifiedDate the modified date of this layout set prototype
316            */
317            @Override
318            public void setModifiedDate(java.util.Date modifiedDate) {
319                    _layoutSetPrototype.setModifiedDate(modifiedDate);
320            }
321    
322            /**
323            * Returns the name of this layout set prototype.
324            *
325            * @return the name of this layout set prototype
326            */
327            @Override
328            public java.lang.String getName() {
329                    return _layoutSetPrototype.getName();
330            }
331    
332            /**
333            * Returns the localized name of this layout set prototype in the language. Uses the default language if no localization exists for the requested language.
334            *
335            * @param locale the locale of the language
336            * @return the localized name of this layout set prototype
337            */
338            @Override
339            public java.lang.String getName(java.util.Locale locale) {
340                    return _layoutSetPrototype.getName(locale);
341            }
342    
343            /**
344            * Returns the localized name of this layout set prototype in the language, optionally using the default language if no localization exists for the requested language.
345            *
346            * @param locale the local of the language
347            * @param useDefault whether to use the default language if no localization exists for the requested language
348            * @return the localized name of this layout set prototype. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
349            */
350            @Override
351            public java.lang.String getName(java.util.Locale locale, boolean useDefault) {
352                    return _layoutSetPrototype.getName(locale, useDefault);
353            }
354    
355            /**
356            * Returns the localized name of this layout set prototype in the language. Uses the default language if no localization exists for the requested language.
357            *
358            * @param languageId the ID of the language
359            * @return the localized name of this layout set prototype
360            */
361            @Override
362            public java.lang.String getName(java.lang.String languageId) {
363                    return _layoutSetPrototype.getName(languageId);
364            }
365    
366            /**
367            * Returns the localized name of this layout set prototype in the language, optionally using the default language if no localization exists for the requested language.
368            *
369            * @param languageId the ID of the language
370            * @param useDefault whether to use the default language if no localization exists for the requested language
371            * @return the localized name of this layout set prototype
372            */
373            @Override
374            public java.lang.String getName(java.lang.String languageId,
375                    boolean useDefault) {
376                    return _layoutSetPrototype.getName(languageId, useDefault);
377            }
378    
379            @Override
380            public java.lang.String getNameCurrentLanguageId() {
381                    return _layoutSetPrototype.getNameCurrentLanguageId();
382            }
383    
384            @Override
385            public java.lang.String getNameCurrentValue() {
386                    return _layoutSetPrototype.getNameCurrentValue();
387            }
388    
389            /**
390            * Returns a map of the locales and localized names of this layout set prototype.
391            *
392            * @return the locales and localized names of this layout set prototype
393            */
394            @Override
395            public java.util.Map<java.util.Locale, java.lang.String> getNameMap() {
396                    return _layoutSetPrototype.getNameMap();
397            }
398    
399            /**
400            * Sets the name of this layout set prototype.
401            *
402            * @param name the name of this layout set prototype
403            */
404            @Override
405            public void setName(java.lang.String name) {
406                    _layoutSetPrototype.setName(name);
407            }
408    
409            /**
410            * Sets the localized name of this layout set prototype in the language.
411            *
412            * @param name the localized name of this layout set prototype
413            * @param locale the locale of the language
414            */
415            @Override
416            public void setName(java.lang.String name, java.util.Locale locale) {
417                    _layoutSetPrototype.setName(name, locale);
418            }
419    
420            /**
421            * Sets the localized name of this layout set prototype in the language, and sets the default locale.
422            *
423            * @param name the localized name of this layout set prototype
424            * @param locale the locale of the language
425            * @param defaultLocale the default locale
426            */
427            @Override
428            public void setName(java.lang.String name, java.util.Locale locale,
429                    java.util.Locale defaultLocale) {
430                    _layoutSetPrototype.setName(name, locale, defaultLocale);
431            }
432    
433            @Override
434            public void setNameCurrentLanguageId(java.lang.String languageId) {
435                    _layoutSetPrototype.setNameCurrentLanguageId(languageId);
436            }
437    
438            /**
439            * Sets the localized names of this layout set prototype from the map of locales and localized names.
440            *
441            * @param nameMap the locales and localized names of this layout set prototype
442            */
443            @Override
444            public void setNameMap(
445                    java.util.Map<java.util.Locale, java.lang.String> nameMap) {
446                    _layoutSetPrototype.setNameMap(nameMap);
447            }
448    
449            /**
450            * Sets the localized names of this layout set prototype from the map of locales and localized names, and sets the default locale.
451            *
452            * @param nameMap the locales and localized names of this layout set prototype
453            * @param defaultLocale the default locale
454            */
455            @Override
456            public void setNameMap(
457                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
458                    java.util.Locale defaultLocale) {
459                    _layoutSetPrototype.setNameMap(nameMap, defaultLocale);
460            }
461    
462            /**
463            * Returns the description of this layout set prototype.
464            *
465            * @return the description of this layout set prototype
466            */
467            @Override
468            public java.lang.String getDescription() {
469                    return _layoutSetPrototype.getDescription();
470            }
471    
472            /**
473            * Sets the description of this layout set prototype.
474            *
475            * @param description the description of this layout set prototype
476            */
477            @Override
478            public void setDescription(java.lang.String description) {
479                    _layoutSetPrototype.setDescription(description);
480            }
481    
482            /**
483            * Returns the settings of this layout set prototype.
484            *
485            * @return the settings of this layout set prototype
486            */
487            @Override
488            public java.lang.String getSettings() {
489                    return _layoutSetPrototype.getSettings();
490            }
491    
492            /**
493            * Sets the settings of this layout set prototype.
494            *
495            * @param settings the settings of this layout set prototype
496            */
497            @Override
498            public void setSettings(java.lang.String settings) {
499                    _layoutSetPrototype.setSettings(settings);
500            }
501    
502            /**
503            * Returns the active of this layout set prototype.
504            *
505            * @return the active of this layout set prototype
506            */
507            @Override
508            public boolean getActive() {
509                    return _layoutSetPrototype.getActive();
510            }
511    
512            /**
513            * Returns <code>true</code> if this layout set prototype is active.
514            *
515            * @return <code>true</code> if this layout set prototype is active; <code>false</code> otherwise
516            */
517            @Override
518            public boolean isActive() {
519                    return _layoutSetPrototype.isActive();
520            }
521    
522            /**
523            * Sets whether this layout set prototype is active.
524            *
525            * @param active the active of this layout set prototype
526            */
527            @Override
528            public void setActive(boolean active) {
529                    _layoutSetPrototype.setActive(active);
530            }
531    
532            @Override
533            public boolean isNew() {
534                    return _layoutSetPrototype.isNew();
535            }
536    
537            @Override
538            public void setNew(boolean n) {
539                    _layoutSetPrototype.setNew(n);
540            }
541    
542            @Override
543            public boolean isCachedModel() {
544                    return _layoutSetPrototype.isCachedModel();
545            }
546    
547            @Override
548            public void setCachedModel(boolean cachedModel) {
549                    _layoutSetPrototype.setCachedModel(cachedModel);
550            }
551    
552            @Override
553            public boolean isEscapedModel() {
554                    return _layoutSetPrototype.isEscapedModel();
555            }
556    
557            @Override
558            public java.io.Serializable getPrimaryKeyObj() {
559                    return _layoutSetPrototype.getPrimaryKeyObj();
560            }
561    
562            @Override
563            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
564                    _layoutSetPrototype.setPrimaryKeyObj(primaryKeyObj);
565            }
566    
567            @Override
568            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
569                    return _layoutSetPrototype.getExpandoBridge();
570            }
571    
572            @Override
573            public void setExpandoBridgeAttributes(
574                    com.liferay.portal.model.BaseModel<?> baseModel) {
575                    _layoutSetPrototype.setExpandoBridgeAttributes(baseModel);
576            }
577    
578            @Override
579            public void setExpandoBridgeAttributes(
580                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
581                    _layoutSetPrototype.setExpandoBridgeAttributes(expandoBridge);
582            }
583    
584            @Override
585            public void setExpandoBridgeAttributes(
586                    com.liferay.portal.service.ServiceContext serviceContext) {
587                    _layoutSetPrototype.setExpandoBridgeAttributes(serviceContext);
588            }
589    
590            @Override
591            public java.lang.String[] getAvailableLanguageIds() {
592                    return _layoutSetPrototype.getAvailableLanguageIds();
593            }
594    
595            @Override
596            public java.lang.String getDefaultLanguageId() {
597                    return _layoutSetPrototype.getDefaultLanguageId();
598            }
599    
600            @Override
601            public void prepareLocalizedFieldsForImport()
602                    throws com.liferay.portal.LocaleException {
603                    _layoutSetPrototype.prepareLocalizedFieldsForImport();
604            }
605    
606            @Override
607            public void prepareLocalizedFieldsForImport(
608                    java.util.Locale defaultImportLocale)
609                    throws com.liferay.portal.LocaleException {
610                    _layoutSetPrototype.prepareLocalizedFieldsForImport(defaultImportLocale);
611            }
612    
613            @Override
614            public java.lang.Object clone() {
615                    return new LayoutSetPrototypeWrapper((LayoutSetPrototype)_layoutSetPrototype.clone());
616            }
617    
618            @Override
619            public int compareTo(
620                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype) {
621                    return _layoutSetPrototype.compareTo(layoutSetPrototype);
622            }
623    
624            @Override
625            public int hashCode() {
626                    return _layoutSetPrototype.hashCode();
627            }
628    
629            @Override
630            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.LayoutSetPrototype> toCacheModel() {
631                    return _layoutSetPrototype.toCacheModel();
632            }
633    
634            @Override
635            public com.liferay.portal.model.LayoutSetPrototype toEscapedModel() {
636                    return new LayoutSetPrototypeWrapper(_layoutSetPrototype.toEscapedModel());
637            }
638    
639            @Override
640            public com.liferay.portal.model.LayoutSetPrototype toUnescapedModel() {
641                    return new LayoutSetPrototypeWrapper(_layoutSetPrototype.toUnescapedModel());
642            }
643    
644            @Override
645            public java.lang.String toString() {
646                    return _layoutSetPrototype.toString();
647            }
648    
649            @Override
650            public java.lang.String toXmlString() {
651                    return _layoutSetPrototype.toXmlString();
652            }
653    
654            @Override
655            public void persist()
656                    throws com.liferay.portal.kernel.exception.SystemException {
657                    _layoutSetPrototype.persist();
658            }
659    
660            @Override
661            public com.liferay.portal.model.Group getGroup()
662                    throws com.liferay.portal.kernel.exception.PortalException,
663                            com.liferay.portal.kernel.exception.SystemException {
664                    return _layoutSetPrototype.getGroup();
665            }
666    
667            @Override
668            public long getGroupId()
669                    throws com.liferay.portal.kernel.exception.PortalException,
670                            com.liferay.portal.kernel.exception.SystemException {
671                    return _layoutSetPrototype.getGroupId();
672            }
673    
674            @Override
675            public com.liferay.portal.model.LayoutSet getLayoutSet()
676                    throws com.liferay.portal.kernel.exception.PortalException,
677                            com.liferay.portal.kernel.exception.SystemException {
678                    return _layoutSetPrototype.getLayoutSet();
679            }
680    
681            @Override
682            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
683                    return _layoutSetPrototype.getSettingsProperties();
684            }
685    
686            @Override
687            public java.lang.String getSettingsProperty(java.lang.String key) {
688                    return _layoutSetPrototype.getSettingsProperty(key);
689            }
690    
691            @Override
692            public void setSettingsProperties(
693                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
694                    _layoutSetPrototype.setSettingsProperties(settingsProperties);
695            }
696    
697            @Override
698            public boolean equals(Object obj) {
699                    if (this == obj) {
700                            return true;
701                    }
702    
703                    if (!(obj instanceof LayoutSetPrototypeWrapper)) {
704                            return false;
705                    }
706    
707                    LayoutSetPrototypeWrapper layoutSetPrototypeWrapper = (LayoutSetPrototypeWrapper)obj;
708    
709                    if (Validator.equals(_layoutSetPrototype,
710                                            layoutSetPrototypeWrapper._layoutSetPrototype)) {
711                            return true;
712                    }
713    
714                    return false;
715            }
716    
717            @Override
718            public StagedModelType getStagedModelType() {
719                    return _layoutSetPrototype.getStagedModelType();
720            }
721    
722            /**
723             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
724             */
725            public LayoutSetPrototype getWrappedLayoutSetPrototype() {
726                    return _layoutSetPrototype;
727            }
728    
729            @Override
730            public LayoutSetPrototype getWrappedModel() {
731                    return _layoutSetPrototype;
732            }
733    
734            @Override
735            public void resetOriginalValues() {
736                    _layoutSetPrototype.resetOriginalValues();
737            }
738    
739            private LayoutSetPrototype _layoutSetPrototype;
740    }