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