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.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    /**
025     * <p>
026     * This class is a wrapper for {@link AssetVocabulary}.
027     * </p>
028     *
029     * @author    Brian Wing Shun Chan
030     * @see       AssetVocabulary
031     * @generated
032     */
033    public class AssetVocabularyWrapper implements AssetVocabulary,
034            ModelWrapper<AssetVocabulary> {
035            public AssetVocabularyWrapper(AssetVocabulary assetVocabulary) {
036                    _assetVocabulary = assetVocabulary;
037            }
038    
039            public Class<?> getModelClass() {
040                    return AssetVocabulary.class;
041            }
042    
043            public String getModelClassName() {
044                    return AssetVocabulary.class.getName();
045            }
046    
047            public Map<String, Object> getModelAttributes() {
048                    Map<String, Object> attributes = new HashMap<String, Object>();
049    
050                    attributes.put("uuid", getUuid());
051                    attributes.put("vocabularyId", getVocabularyId());
052                    attributes.put("groupId", getGroupId());
053                    attributes.put("companyId", getCompanyId());
054                    attributes.put("userId", getUserId());
055                    attributes.put("userName", getUserName());
056                    attributes.put("createDate", getCreateDate());
057                    attributes.put("modifiedDate", getModifiedDate());
058                    attributes.put("name", getName());
059                    attributes.put("title", getTitle());
060                    attributes.put("description", getDescription());
061                    attributes.put("settings", getSettings());
062    
063                    return attributes;
064            }
065    
066            public void setModelAttributes(Map<String, Object> attributes) {
067                    String uuid = (String)attributes.get("uuid");
068    
069                    if (uuid != null) {
070                            setUuid(uuid);
071                    }
072    
073                    Long vocabularyId = (Long)attributes.get("vocabularyId");
074    
075                    if (vocabularyId != null) {
076                            setVocabularyId(vocabularyId);
077                    }
078    
079                    Long groupId = (Long)attributes.get("groupId");
080    
081                    if (groupId != null) {
082                            setGroupId(groupId);
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 title = (String)attributes.get("title");
122    
123                    if (title != null) {
124                            setTitle(title);
125                    }
126    
127                    String description = (String)attributes.get("description");
128    
129                    if (description != null) {
130                            setDescription(description);
131                    }
132    
133                    String settings = (String)attributes.get("settings");
134    
135                    if (settings != null) {
136                            setSettings(settings);
137                    }
138            }
139    
140            /**
141            * Returns the primary key of this asset vocabulary.
142            *
143            * @return the primary key of this asset vocabulary
144            */
145            public long getPrimaryKey() {
146                    return _assetVocabulary.getPrimaryKey();
147            }
148    
149            /**
150            * Sets the primary key of this asset vocabulary.
151            *
152            * @param primaryKey the primary key of this asset vocabulary
153            */
154            public void setPrimaryKey(long primaryKey) {
155                    _assetVocabulary.setPrimaryKey(primaryKey);
156            }
157    
158            /**
159            * Returns the uuid of this asset vocabulary.
160            *
161            * @return the uuid of this asset vocabulary
162            */
163            public java.lang.String getUuid() {
164                    return _assetVocabulary.getUuid();
165            }
166    
167            /**
168            * Sets the uuid of this asset vocabulary.
169            *
170            * @param uuid the uuid of this asset vocabulary
171            */
172            public void setUuid(java.lang.String uuid) {
173                    _assetVocabulary.setUuid(uuid);
174            }
175    
176            /**
177            * Returns the vocabulary ID of this asset vocabulary.
178            *
179            * @return the vocabulary ID of this asset vocabulary
180            */
181            public long getVocabularyId() {
182                    return _assetVocabulary.getVocabularyId();
183            }
184    
185            /**
186            * Sets the vocabulary ID of this asset vocabulary.
187            *
188            * @param vocabularyId the vocabulary ID of this asset vocabulary
189            */
190            public void setVocabularyId(long vocabularyId) {
191                    _assetVocabulary.setVocabularyId(vocabularyId);
192            }
193    
194            /**
195            * Returns the group ID of this asset vocabulary.
196            *
197            * @return the group ID of this asset vocabulary
198            */
199            public long getGroupId() {
200                    return _assetVocabulary.getGroupId();
201            }
202    
203            /**
204            * Sets the group ID of this asset vocabulary.
205            *
206            * @param groupId the group ID of this asset vocabulary
207            */
208            public void setGroupId(long groupId) {
209                    _assetVocabulary.setGroupId(groupId);
210            }
211    
212            /**
213            * Returns the company ID of this asset vocabulary.
214            *
215            * @return the company ID of this asset vocabulary
216            */
217            public long getCompanyId() {
218                    return _assetVocabulary.getCompanyId();
219            }
220    
221            /**
222            * Sets the company ID of this asset vocabulary.
223            *
224            * @param companyId the company ID of this asset vocabulary
225            */
226            public void setCompanyId(long companyId) {
227                    _assetVocabulary.setCompanyId(companyId);
228            }
229    
230            /**
231            * Returns the user ID of this asset vocabulary.
232            *
233            * @return the user ID of this asset vocabulary
234            */
235            public long getUserId() {
236                    return _assetVocabulary.getUserId();
237            }
238    
239            /**
240            * Sets the user ID of this asset vocabulary.
241            *
242            * @param userId the user ID of this asset vocabulary
243            */
244            public void setUserId(long userId) {
245                    _assetVocabulary.setUserId(userId);
246            }
247    
248            /**
249            * Returns the user uuid of this asset vocabulary.
250            *
251            * @return the user uuid of this asset vocabulary
252            * @throws SystemException if a system exception occurred
253            */
254            public java.lang.String getUserUuid()
255                    throws com.liferay.portal.kernel.exception.SystemException {
256                    return _assetVocabulary.getUserUuid();
257            }
258    
259            /**
260            * Sets the user uuid of this asset vocabulary.
261            *
262            * @param userUuid the user uuid of this asset vocabulary
263            */
264            public void setUserUuid(java.lang.String userUuid) {
265                    _assetVocabulary.setUserUuid(userUuid);
266            }
267    
268            /**
269            * Returns the user name of this asset vocabulary.
270            *
271            * @return the user name of this asset vocabulary
272            */
273            public java.lang.String getUserName() {
274                    return _assetVocabulary.getUserName();
275            }
276    
277            /**
278            * Sets the user name of this asset vocabulary.
279            *
280            * @param userName the user name of this asset vocabulary
281            */
282            public void setUserName(java.lang.String userName) {
283                    _assetVocabulary.setUserName(userName);
284            }
285    
286            /**
287            * Returns the create date of this asset vocabulary.
288            *
289            * @return the create date of this asset vocabulary
290            */
291            public java.util.Date getCreateDate() {
292                    return _assetVocabulary.getCreateDate();
293            }
294    
295            /**
296            * Sets the create date of this asset vocabulary.
297            *
298            * @param createDate the create date of this asset vocabulary
299            */
300            public void setCreateDate(java.util.Date createDate) {
301                    _assetVocabulary.setCreateDate(createDate);
302            }
303    
304            /**
305            * Returns the modified date of this asset vocabulary.
306            *
307            * @return the modified date of this asset vocabulary
308            */
309            public java.util.Date getModifiedDate() {
310                    return _assetVocabulary.getModifiedDate();
311            }
312    
313            /**
314            * Sets the modified date of this asset vocabulary.
315            *
316            * @param modifiedDate the modified date of this asset vocabulary
317            */
318            public void setModifiedDate(java.util.Date modifiedDate) {
319                    _assetVocabulary.setModifiedDate(modifiedDate);
320            }
321    
322            /**
323            * Returns the name of this asset vocabulary.
324            *
325            * @return the name of this asset vocabulary
326            */
327            public java.lang.String getName() {
328                    return _assetVocabulary.getName();
329            }
330    
331            /**
332            * Sets the name of this asset vocabulary.
333            *
334            * @param name the name of this asset vocabulary
335            */
336            public void setName(java.lang.String name) {
337                    _assetVocabulary.setName(name);
338            }
339    
340            /**
341            * Returns the title of this asset vocabulary.
342            *
343            * @return the title of this asset vocabulary
344            */
345            public java.lang.String getTitle() {
346                    return _assetVocabulary.getTitle();
347            }
348    
349            /**
350            * Returns the localized title of this asset vocabulary in the language. Uses the default language if no localization exists for the requested language.
351            *
352            * @param locale the locale of the language
353            * @return the localized title of this asset vocabulary
354            */
355            public java.lang.String getTitle(java.util.Locale locale) {
356                    return _assetVocabulary.getTitle(locale);
357            }
358    
359            /**
360            * Returns the localized title of this asset vocabulary in the language, optionally using the default language if no localization exists for the requested language.
361            *
362            * @param locale the local of the language
363            * @param useDefault whether to use the default language if no localization exists for the requested language
364            * @return the localized title of this asset vocabulary. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
365            */
366            public java.lang.String getTitle(java.util.Locale locale, boolean useDefault) {
367                    return _assetVocabulary.getTitle(locale, useDefault);
368            }
369    
370            /**
371            * Returns the localized title of this asset vocabulary in the language. Uses the default language if no localization exists for the requested language.
372            *
373            * @param languageId the ID of the language
374            * @return the localized title of this asset vocabulary
375            */
376            public java.lang.String getTitle(java.lang.String languageId) {
377                    return _assetVocabulary.getTitle(languageId);
378            }
379    
380            /**
381            * Returns the localized title of this asset vocabulary in the language, optionally using the default language if no localization exists for the requested language.
382            *
383            * @param languageId the ID of the language
384            * @param useDefault whether to use the default language if no localization exists for the requested language
385            * @return the localized title of this asset vocabulary
386            */
387            public java.lang.String getTitle(java.lang.String languageId,
388                    boolean useDefault) {
389                    return _assetVocabulary.getTitle(languageId, useDefault);
390            }
391    
392            public java.lang.String getTitleCurrentLanguageId() {
393                    return _assetVocabulary.getTitleCurrentLanguageId();
394            }
395    
396            public java.lang.String getTitleCurrentValue() {
397                    return _assetVocabulary.getTitleCurrentValue();
398            }
399    
400            /**
401            * Returns a map of the locales and localized titles of this asset vocabulary.
402            *
403            * @return the locales and localized titles of this asset vocabulary
404            */
405            public java.util.Map<java.util.Locale, java.lang.String> getTitleMap() {
406                    return _assetVocabulary.getTitleMap();
407            }
408    
409            /**
410            * Sets the title of this asset vocabulary.
411            *
412            * @param title the title of this asset vocabulary
413            */
414            public void setTitle(java.lang.String title) {
415                    _assetVocabulary.setTitle(title);
416            }
417    
418            /**
419            * Sets the localized title of this asset vocabulary in the language.
420            *
421            * @param title the localized title of this asset vocabulary
422            * @param locale the locale of the language
423            */
424            public void setTitle(java.lang.String title, java.util.Locale locale) {
425                    _assetVocabulary.setTitle(title, locale);
426            }
427    
428            /**
429            * Sets the localized title of this asset vocabulary in the language, and sets the default locale.
430            *
431            * @param title the localized title of this asset vocabulary
432            * @param locale the locale of the language
433            * @param defaultLocale the default locale
434            */
435            public void setTitle(java.lang.String title, java.util.Locale locale,
436                    java.util.Locale defaultLocale) {
437                    _assetVocabulary.setTitle(title, locale, defaultLocale);
438            }
439    
440            public void setTitleCurrentLanguageId(java.lang.String languageId) {
441                    _assetVocabulary.setTitleCurrentLanguageId(languageId);
442            }
443    
444            /**
445            * Sets the localized titles of this asset vocabulary from the map of locales and localized titles.
446            *
447            * @param titleMap the locales and localized titles of this asset vocabulary
448            */
449            public void setTitleMap(
450                    java.util.Map<java.util.Locale, java.lang.String> titleMap) {
451                    _assetVocabulary.setTitleMap(titleMap);
452            }
453    
454            /**
455            * Sets the localized titles of this asset vocabulary from the map of locales and localized titles, and sets the default locale.
456            *
457            * @param titleMap the locales and localized titles of this asset vocabulary
458            * @param defaultLocale the default locale
459            */
460            public void setTitleMap(
461                    java.util.Map<java.util.Locale, java.lang.String> titleMap,
462                    java.util.Locale defaultLocale) {
463                    _assetVocabulary.setTitleMap(titleMap, defaultLocale);
464            }
465    
466            /**
467            * Returns the description of this asset vocabulary.
468            *
469            * @return the description of this asset vocabulary
470            */
471            public java.lang.String getDescription() {
472                    return _assetVocabulary.getDescription();
473            }
474    
475            /**
476            * Returns the localized description of this asset vocabulary in the language. Uses the default language if no localization exists for the requested language.
477            *
478            * @param locale the locale of the language
479            * @return the localized description of this asset vocabulary
480            */
481            public java.lang.String getDescription(java.util.Locale locale) {
482                    return _assetVocabulary.getDescription(locale);
483            }
484    
485            /**
486            * Returns the localized description of this asset vocabulary in the language, optionally using the default language if no localization exists for the requested language.
487            *
488            * @param locale the local of the language
489            * @param useDefault whether to use the default language if no localization exists for the requested language
490            * @return the localized description of this asset vocabulary. If <code>useDefault</code> is <code>false</code> and no localization exists for the requested language, an empty string will be returned.
491            */
492            public java.lang.String getDescription(java.util.Locale locale,
493                    boolean useDefault) {
494                    return _assetVocabulary.getDescription(locale, useDefault);
495            }
496    
497            /**
498            * Returns the localized description of this asset vocabulary in the language. Uses the default language if no localization exists for the requested language.
499            *
500            * @param languageId the ID of the language
501            * @return the localized description of this asset vocabulary
502            */
503            public java.lang.String getDescription(java.lang.String languageId) {
504                    return _assetVocabulary.getDescription(languageId);
505            }
506    
507            /**
508            * Returns the localized description of this asset vocabulary in the language, optionally using the default language if no localization exists for the requested language.
509            *
510            * @param languageId the ID of the language
511            * @param useDefault whether to use the default language if no localization exists for the requested language
512            * @return the localized description of this asset vocabulary
513            */
514            public java.lang.String getDescription(java.lang.String languageId,
515                    boolean useDefault) {
516                    return _assetVocabulary.getDescription(languageId, useDefault);
517            }
518    
519            public java.lang.String getDescriptionCurrentLanguageId() {
520                    return _assetVocabulary.getDescriptionCurrentLanguageId();
521            }
522    
523            public java.lang.String getDescriptionCurrentValue() {
524                    return _assetVocabulary.getDescriptionCurrentValue();
525            }
526    
527            /**
528            * Returns a map of the locales and localized descriptions of this asset vocabulary.
529            *
530            * @return the locales and localized descriptions of this asset vocabulary
531            */
532            public java.util.Map<java.util.Locale, java.lang.String> getDescriptionMap() {
533                    return _assetVocabulary.getDescriptionMap();
534            }
535    
536            /**
537            * Sets the description of this asset vocabulary.
538            *
539            * @param description the description of this asset vocabulary
540            */
541            public void setDescription(java.lang.String description) {
542                    _assetVocabulary.setDescription(description);
543            }
544    
545            /**
546            * Sets the localized description of this asset vocabulary in the language.
547            *
548            * @param description the localized description of this asset vocabulary
549            * @param locale the locale of the language
550            */
551            public void setDescription(java.lang.String description,
552                    java.util.Locale locale) {
553                    _assetVocabulary.setDescription(description, locale);
554            }
555    
556            /**
557            * Sets the localized description of this asset vocabulary in the language, and sets the default locale.
558            *
559            * @param description the localized description of this asset vocabulary
560            * @param locale the locale of the language
561            * @param defaultLocale the default locale
562            */
563            public void setDescription(java.lang.String description,
564                    java.util.Locale locale, java.util.Locale defaultLocale) {
565                    _assetVocabulary.setDescription(description, locale, defaultLocale);
566            }
567    
568            public void setDescriptionCurrentLanguageId(java.lang.String languageId) {
569                    _assetVocabulary.setDescriptionCurrentLanguageId(languageId);
570            }
571    
572            /**
573            * Sets the localized descriptions of this asset vocabulary from the map of locales and localized descriptions.
574            *
575            * @param descriptionMap the locales and localized descriptions of this asset vocabulary
576            */
577            public void setDescriptionMap(
578                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap) {
579                    _assetVocabulary.setDescriptionMap(descriptionMap);
580            }
581    
582            /**
583            * Sets the localized descriptions of this asset vocabulary from the map of locales and localized descriptions, and sets the default locale.
584            *
585            * @param descriptionMap the locales and localized descriptions of this asset vocabulary
586            * @param defaultLocale the default locale
587            */
588            public void setDescriptionMap(
589                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
590                    java.util.Locale defaultLocale) {
591                    _assetVocabulary.setDescriptionMap(descriptionMap, defaultLocale);
592            }
593    
594            /**
595            * Returns the settings of this asset vocabulary.
596            *
597            * @return the settings of this asset vocabulary
598            */
599            public java.lang.String getSettings() {
600                    return _assetVocabulary.getSettings();
601            }
602    
603            /**
604            * Sets the settings of this asset vocabulary.
605            *
606            * @param settings the settings of this asset vocabulary
607            */
608            public void setSettings(java.lang.String settings) {
609                    _assetVocabulary.setSettings(settings);
610            }
611    
612            public boolean isNew() {
613                    return _assetVocabulary.isNew();
614            }
615    
616            public void setNew(boolean n) {
617                    _assetVocabulary.setNew(n);
618            }
619    
620            public boolean isCachedModel() {
621                    return _assetVocabulary.isCachedModel();
622            }
623    
624            public void setCachedModel(boolean cachedModel) {
625                    _assetVocabulary.setCachedModel(cachedModel);
626            }
627    
628            public boolean isEscapedModel() {
629                    return _assetVocabulary.isEscapedModel();
630            }
631    
632            public java.io.Serializable getPrimaryKeyObj() {
633                    return _assetVocabulary.getPrimaryKeyObj();
634            }
635    
636            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
637                    _assetVocabulary.setPrimaryKeyObj(primaryKeyObj);
638            }
639    
640            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
641                    return _assetVocabulary.getExpandoBridge();
642            }
643    
644            public void setExpandoBridgeAttributes(
645                    com.liferay.portal.service.ServiceContext serviceContext) {
646                    _assetVocabulary.setExpandoBridgeAttributes(serviceContext);
647            }
648    
649            public void prepareLocalizedFieldsForImport(
650                    java.util.Locale defaultImportLocale)
651                    throws com.liferay.portal.LocaleException {
652                    _assetVocabulary.prepareLocalizedFieldsForImport(defaultImportLocale);
653            }
654    
655            @Override
656            public java.lang.Object clone() {
657                    return new AssetVocabularyWrapper((AssetVocabulary)_assetVocabulary.clone());
658            }
659    
660            public int compareTo(
661                    com.liferay.portlet.asset.model.AssetVocabulary assetVocabulary) {
662                    return _assetVocabulary.compareTo(assetVocabulary);
663            }
664    
665            @Override
666            public int hashCode() {
667                    return _assetVocabulary.hashCode();
668            }
669    
670            public com.liferay.portal.model.CacheModel<com.liferay.portlet.asset.model.AssetVocabulary> toCacheModel() {
671                    return _assetVocabulary.toCacheModel();
672            }
673    
674            public com.liferay.portlet.asset.model.AssetVocabulary toEscapedModel() {
675                    return new AssetVocabularyWrapper(_assetVocabulary.toEscapedModel());
676            }
677    
678            public com.liferay.portlet.asset.model.AssetVocabulary toUnescapedModel() {
679                    return new AssetVocabularyWrapper(_assetVocabulary.toUnescapedModel());
680            }
681    
682            @Override
683            public java.lang.String toString() {
684                    return _assetVocabulary.toString();
685            }
686    
687            public java.lang.String toXmlString() {
688                    return _assetVocabulary.toXmlString();
689            }
690    
691            public void persist()
692                    throws com.liferay.portal.kernel.exception.SystemException {
693                    _assetVocabulary.persist();
694            }
695    
696            public com.liferay.portal.kernel.util.UnicodeProperties getSettingsProperties() {
697                    return _assetVocabulary.getSettingsProperties();
698            }
699    
700            public boolean isMultiValued() {
701                    return _assetVocabulary.isMultiValued();
702            }
703    
704            public boolean isRequired(long classNameId) {
705                    return _assetVocabulary.isRequired(classNameId);
706            }
707    
708            public void setSettingsProperties(
709                    com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
710                    _assetVocabulary.setSettingsProperties(settingsProperties);
711            }
712    
713            @Override
714            public boolean equals(Object obj) {
715                    if (this == obj) {
716                            return true;
717                    }
718    
719                    if (!(obj instanceof AssetVocabularyWrapper)) {
720                            return false;
721                    }
722    
723                    AssetVocabularyWrapper assetVocabularyWrapper = (AssetVocabularyWrapper)obj;
724    
725                    if (Validator.equals(_assetVocabulary,
726                                            assetVocabularyWrapper._assetVocabulary)) {
727                            return true;
728                    }
729    
730                    return false;
731            }
732    
733            /**
734             * @deprecated Renamed to {@link #getWrappedModel}
735             */
736            public AssetVocabulary getWrappedAssetVocabulary() {
737                    return _assetVocabulary;
738            }
739    
740            public AssetVocabulary getWrappedModel() {
741                    return _assetVocabulary;
742            }
743    
744            public void resetOriginalValues() {
745                    _assetVocabulary.resetOriginalValues();
746            }
747    
748            private AssetVocabulary _assetVocabulary;
749    }