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