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