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