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