001    /**
002     * Copyright (c) 2000-present 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.portal.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.util.Validator;
020    
021    import com.liferay.portlet.exportimport.lar.StagedModelType;
022    
023    import java.util.Date;
024    import java.util.HashMap;
025    import java.util.Map;
026    
027    /**
028     * <p>
029     * This class is a wrapper for {@link Organization}.
030     * </p>
031     *
032     * @author Brian Wing Shun Chan
033     * @see Organization
034     * @generated
035     */
036    @ProviderType
037    public class OrganizationWrapper implements Organization,
038            ModelWrapper<Organization> {
039            public OrganizationWrapper(Organization organization) {
040                    _organization = organization;
041            }
042    
043            @Override
044            public Class<?> getModelClass() {
045                    return Organization.class;
046            }
047    
048            @Override
049            public String getModelClassName() {
050                    return Organization.class.getName();
051            }
052    
053            @Override
054            public Map<String, Object> getModelAttributes() {
055                    Map<String, Object> attributes = new HashMap<String, Object>();
056    
057                    attributes.put("mvccVersion", getMvccVersion());
058                    attributes.put("uuid", getUuid());
059                    attributes.put("organizationId", getOrganizationId());
060                    attributes.put("companyId", getCompanyId());
061                    attributes.put("userId", getUserId());
062                    attributes.put("userName", getUserName());
063                    attributes.put("createDate", getCreateDate());
064                    attributes.put("modifiedDate", getModifiedDate());
065                    attributes.put("parentOrganizationId", getParentOrganizationId());
066                    attributes.put("treePath", getTreePath());
067                    attributes.put("name", getName());
068                    attributes.put("type", getType());
069                    attributes.put("recursable", getRecursable());
070                    attributes.put("regionId", getRegionId());
071                    attributes.put("countryId", getCountryId());
072                    attributes.put("statusId", getStatusId());
073                    attributes.put("comments", getComments());
074                    attributes.put("logoId", getLogoId());
075    
076                    return attributes;
077            }
078    
079            @Override
080            public void setModelAttributes(Map<String, Object> attributes) {
081                    Long mvccVersion = (Long)attributes.get("mvccVersion");
082    
083                    if (mvccVersion != null) {
084                            setMvccVersion(mvccVersion);
085                    }
086    
087                    String uuid = (String)attributes.get("uuid");
088    
089                    if (uuid != null) {
090                            setUuid(uuid);
091                    }
092    
093                    Long organizationId = (Long)attributes.get("organizationId");
094    
095                    if (organizationId != null) {
096                            setOrganizationId(organizationId);
097                    }
098    
099                    Long companyId = (Long)attributes.get("companyId");
100    
101                    if (companyId != null) {
102                            setCompanyId(companyId);
103                    }
104    
105                    Long userId = (Long)attributes.get("userId");
106    
107                    if (userId != null) {
108                            setUserId(userId);
109                    }
110    
111                    String userName = (String)attributes.get("userName");
112    
113                    if (userName != null) {
114                            setUserName(userName);
115                    }
116    
117                    Date createDate = (Date)attributes.get("createDate");
118    
119                    if (createDate != null) {
120                            setCreateDate(createDate);
121                    }
122    
123                    Date modifiedDate = (Date)attributes.get("modifiedDate");
124    
125                    if (modifiedDate != null) {
126                            setModifiedDate(modifiedDate);
127                    }
128    
129                    Long parentOrganizationId = (Long)attributes.get("parentOrganizationId");
130    
131                    if (parentOrganizationId != null) {
132                            setParentOrganizationId(parentOrganizationId);
133                    }
134    
135                    String treePath = (String)attributes.get("treePath");
136    
137                    if (treePath != null) {
138                            setTreePath(treePath);
139                    }
140    
141                    String name = (String)attributes.get("name");
142    
143                    if (name != null) {
144                            setName(name);
145                    }
146    
147                    String type = (String)attributes.get("type");
148    
149                    if (type != null) {
150                            setType(type);
151                    }
152    
153                    Boolean recursable = (Boolean)attributes.get("recursable");
154    
155                    if (recursable != null) {
156                            setRecursable(recursable);
157                    }
158    
159                    Long regionId = (Long)attributes.get("regionId");
160    
161                    if (regionId != null) {
162                            setRegionId(regionId);
163                    }
164    
165                    Long countryId = (Long)attributes.get("countryId");
166    
167                    if (countryId != null) {
168                            setCountryId(countryId);
169                    }
170    
171                    Long statusId = (Long)attributes.get("statusId");
172    
173                    if (statusId != null) {
174                            setStatusId(statusId);
175                    }
176    
177                    String comments = (String)attributes.get("comments");
178    
179                    if (comments != null) {
180                            setComments(comments);
181                    }
182    
183                    Long logoId = (Long)attributes.get("logoId");
184    
185                    if (logoId != null) {
186                            setLogoId(logoId);
187                    }
188            }
189    
190            @Override
191            public java.lang.String buildTreePath()
192                    throws com.liferay.portal.kernel.exception.PortalException {
193                    return _organization.buildTreePath();
194            }
195    
196            @Override
197            public java.lang.Object clone() {
198                    return new OrganizationWrapper((Organization)_organization.clone());
199            }
200    
201            @Override
202            public int compareTo(com.liferay.portal.model.Organization organization) {
203                    return _organization.compareTo(organization);
204            }
205    
206            @Override
207            public com.liferay.portal.model.Address getAddress() {
208                    return _organization.getAddress();
209            }
210    
211            @Override
212            public java.util.List<com.liferay.portal.model.Address> getAddresses() {
213                    return _organization.getAddresses();
214            }
215    
216            @Override
217            public long[] getAncestorOrganizationIds()
218                    throws com.liferay.portal.kernel.exception.PortalException {
219                    return _organization.getAncestorOrganizationIds();
220            }
221    
222            @Override
223            public java.util.List<com.liferay.portal.model.Organization> getAncestors()
224                    throws com.liferay.portal.kernel.exception.PortalException {
225                    return _organization.getAncestors();
226            }
227    
228            @Override
229            public java.lang.String[] getChildrenTypes() {
230                    return _organization.getChildrenTypes();
231            }
232    
233            /**
234            * Returns the comments of this organization.
235            *
236            * @return the comments of this organization
237            */
238            @Override
239            public java.lang.String getComments() {
240                    return _organization.getComments();
241            }
242    
243            /**
244            * Returns the company ID of this organization.
245            *
246            * @return the company ID of this organization
247            */
248            @Override
249            public long getCompanyId() {
250                    return _organization.getCompanyId();
251            }
252    
253            /**
254            * Returns the country ID of this organization.
255            *
256            * @return the country ID of this organization
257            */
258            @Override
259            public long getCountryId() {
260                    return _organization.getCountryId();
261            }
262    
263            /**
264            * Returns the create date of this organization.
265            *
266            * @return the create date of this organization
267            */
268            @Override
269            public Date getCreateDate() {
270                    return _organization.getCreateDate();
271            }
272    
273            @Override
274            public java.util.List<com.liferay.portal.model.Organization> getDescendants() {
275                    return _organization.getDescendants();
276            }
277    
278            @Override
279            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
280                    return _organization.getExpandoBridge();
281            }
282    
283            @Override
284            public com.liferay.portal.model.Group getGroup() {
285                    return _organization.getGroup();
286            }
287    
288            @Override
289            public long getGroupId() {
290                    return _organization.getGroupId();
291            }
292    
293            /**
294            * Returns the logo ID of this organization.
295            *
296            * @return the logo ID of this organization
297            */
298            @Override
299            public long getLogoId() {
300                    return _organization.getLogoId();
301            }
302    
303            /**
304            * Returns the modified date of this organization.
305            *
306            * @return the modified date of this organization
307            */
308            @Override
309            public Date getModifiedDate() {
310                    return _organization.getModifiedDate();
311            }
312    
313            /**
314            * Returns the mvcc version of this organization.
315            *
316            * @return the mvcc version of this organization
317            */
318            @Override
319            public long getMvccVersion() {
320                    return _organization.getMvccVersion();
321            }
322    
323            /**
324            * Returns the name of this organization.
325            *
326            * @return the name of this organization
327            */
328            @Override
329            public java.lang.String getName() {
330                    return _organization.getName();
331            }
332    
333            /**
334            * Returns the organization ID of this organization.
335            *
336            * @return the organization ID of this organization
337            */
338            @Override
339            public long getOrganizationId() {
340                    return _organization.getOrganizationId();
341            }
342    
343            @Override
344            public com.liferay.portal.model.Organization getParentOrganization()
345                    throws com.liferay.portal.kernel.exception.PortalException {
346                    return _organization.getParentOrganization();
347            }
348    
349            /**
350            * Returns the parent organization ID of this organization.
351            *
352            * @return the parent organization ID of this organization
353            */
354            @Override
355            public long getParentOrganizationId() {
356                    return _organization.getParentOrganizationId();
357            }
358    
359            @Override
360            public java.lang.String getParentOrganizationName() {
361                    return _organization.getParentOrganizationName();
362            }
363    
364            @Override
365            public javax.portlet.PortletPreferences getPreferences() {
366                    return _organization.getPreferences();
367            }
368    
369            /**
370            * Returns the primary key of this organization.
371            *
372            * @return the primary key of this organization
373            */
374            @Override
375            public long getPrimaryKey() {
376                    return _organization.getPrimaryKey();
377            }
378    
379            @Override
380            public java.io.Serializable getPrimaryKeyObj() {
381                    return _organization.getPrimaryKeyObj();
382            }
383    
384            @Override
385            public int getPrivateLayoutsPageCount() {
386                    return _organization.getPrivateLayoutsPageCount();
387            }
388    
389            @Override
390            public int getPublicLayoutsPageCount() {
391                    return _organization.getPublicLayoutsPageCount();
392            }
393    
394            /**
395            * Returns the recursable of this organization.
396            *
397            * @return the recursable of this organization
398            */
399            @Override
400            public boolean getRecursable() {
401                    return _organization.getRecursable();
402            }
403    
404            /**
405            * Returns the region ID of this organization.
406            *
407            * @return the region ID of this organization
408            */
409            @Override
410            public long getRegionId() {
411                    return _organization.getRegionId();
412            }
413    
414            @Override
415            public java.util.Set<java.lang.String> getReminderQueryQuestions(
416                    java.lang.String languageId) {
417                    return _organization.getReminderQueryQuestions(languageId);
418            }
419    
420            @Override
421            public java.util.Set<java.lang.String> getReminderQueryQuestions(
422                    java.util.Locale locale) {
423                    return _organization.getReminderQueryQuestions(locale);
424            }
425    
426            /**
427            * Returns the status ID of this organization.
428            *
429            * @return the status ID of this organization
430            */
431            @Override
432            public long getStatusId() {
433                    return _organization.getStatusId();
434            }
435    
436            @Override
437            public java.util.List<com.liferay.portal.model.Organization> getSuborganizations() {
438                    return _organization.getSuborganizations();
439            }
440    
441            @Override
442            public int getSuborganizationsSize() {
443                    return _organization.getSuborganizationsSize();
444            }
445    
446            /**
447            * Returns the tree path of this organization.
448            *
449            * @return the tree path of this organization
450            */
451            @Override
452            public java.lang.String getTreePath() {
453                    return _organization.getTreePath();
454            }
455    
456            /**
457            * Returns the type of this organization.
458            *
459            * @return the type of this organization
460            */
461            @Override
462            public java.lang.String getType() {
463                    return _organization.getType();
464            }
465    
466            @Override
467            public int getTypeOrder() {
468                    return _organization.getTypeOrder();
469            }
470    
471            /**
472            * Returns the user ID of this organization.
473            *
474            * @return the user ID of this organization
475            */
476            @Override
477            public long getUserId() {
478                    return _organization.getUserId();
479            }
480    
481            /**
482            * Returns the user name of this organization.
483            *
484            * @return the user name of this organization
485            */
486            @Override
487            public java.lang.String getUserName() {
488                    return _organization.getUserName();
489            }
490    
491            /**
492            * Returns the user uuid of this organization.
493            *
494            * @return the user uuid of this organization
495            */
496            @Override
497            public java.lang.String getUserUuid() {
498                    return _organization.getUserUuid();
499            }
500    
501            /**
502            * Returns the uuid of this organization.
503            *
504            * @return the uuid of this organization
505            */
506            @Override
507            public java.lang.String getUuid() {
508                    return _organization.getUuid();
509            }
510    
511            @Override
512            public boolean hasPrivateLayouts() {
513                    return _organization.hasPrivateLayouts();
514            }
515    
516            @Override
517            public boolean hasPublicLayouts() {
518                    return _organization.hasPublicLayouts();
519            }
520    
521            @Override
522            public boolean hasSuborganizations() {
523                    return _organization.hasSuborganizations();
524            }
525    
526            @Override
527            public int hashCode() {
528                    return _organization.hashCode();
529            }
530    
531            @Override
532            public boolean isCachedModel() {
533                    return _organization.isCachedModel();
534            }
535    
536            @Override
537            public boolean isEscapedModel() {
538                    return _organization.isEscapedModel();
539            }
540    
541            @Override
542            public boolean isNew() {
543                    return _organization.isNew();
544            }
545    
546            @Override
547            public boolean isParentable() {
548                    return _organization.isParentable();
549            }
550    
551            /**
552            * Returns <code>true</code> if this organization is recursable.
553            *
554            * @return <code>true</code> if this organization is recursable; <code>false</code> otherwise
555            */
556            @Override
557            public boolean isRecursable() {
558                    return _organization.isRecursable();
559            }
560    
561            @Override
562            public boolean isRoot() {
563                    return _organization.isRoot();
564            }
565    
566            @Override
567            public void persist() {
568                    _organization.persist();
569            }
570    
571            @Override
572            public void setCachedModel(boolean cachedModel) {
573                    _organization.setCachedModel(cachedModel);
574            }
575    
576            /**
577            * Sets the comments of this organization.
578            *
579            * @param comments the comments of this organization
580            */
581            @Override
582            public void setComments(java.lang.String comments) {
583                    _organization.setComments(comments);
584            }
585    
586            /**
587            * Sets the company ID of this organization.
588            *
589            * @param companyId the company ID of this organization
590            */
591            @Override
592            public void setCompanyId(long companyId) {
593                    _organization.setCompanyId(companyId);
594            }
595    
596            /**
597            * Sets the country ID of this organization.
598            *
599            * @param countryId the country ID of this organization
600            */
601            @Override
602            public void setCountryId(long countryId) {
603                    _organization.setCountryId(countryId);
604            }
605    
606            /**
607            * Sets the create date of this organization.
608            *
609            * @param createDate the create date of this organization
610            */
611            @Override
612            public void setCreateDate(Date createDate) {
613                    _organization.setCreateDate(createDate);
614            }
615    
616            @Override
617            public void setExpandoBridgeAttributes(BaseModel<?> baseModel) {
618                    _organization.setExpandoBridgeAttributes(baseModel);
619            }
620    
621            @Override
622            public void setExpandoBridgeAttributes(
623                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
624                    _organization.setExpandoBridgeAttributes(expandoBridge);
625            }
626    
627            @Override
628            public void setExpandoBridgeAttributes(
629                    com.liferay.portal.service.ServiceContext serviceContext) {
630                    _organization.setExpandoBridgeAttributes(serviceContext);
631            }
632    
633            /**
634            * Sets the logo ID of this organization.
635            *
636            * @param logoId the logo ID of this organization
637            */
638            @Override
639            public void setLogoId(long logoId) {
640                    _organization.setLogoId(logoId);
641            }
642    
643            /**
644            * Sets the modified date of this organization.
645            *
646            * @param modifiedDate the modified date of this organization
647            */
648            @Override
649            public void setModifiedDate(Date modifiedDate) {
650                    _organization.setModifiedDate(modifiedDate);
651            }
652    
653            /**
654            * Sets the mvcc version of this organization.
655            *
656            * @param mvccVersion the mvcc version of this organization
657            */
658            @Override
659            public void setMvccVersion(long mvccVersion) {
660                    _organization.setMvccVersion(mvccVersion);
661            }
662    
663            /**
664            * Sets the name of this organization.
665            *
666            * @param name the name of this organization
667            */
668            @Override
669            public void setName(java.lang.String name) {
670                    _organization.setName(name);
671            }
672    
673            @Override
674            public void setNew(boolean n) {
675                    _organization.setNew(n);
676            }
677    
678            /**
679            * Sets the organization ID of this organization.
680            *
681            * @param organizationId the organization ID of this organization
682            */
683            @Override
684            public void setOrganizationId(long organizationId) {
685                    _organization.setOrganizationId(organizationId);
686            }
687    
688            /**
689            * Sets the parent organization ID of this organization.
690            *
691            * @param parentOrganizationId the parent organization ID of this organization
692            */
693            @Override
694            public void setParentOrganizationId(long parentOrganizationId) {
695                    _organization.setParentOrganizationId(parentOrganizationId);
696            }
697    
698            /**
699            * Sets the primary key of this organization.
700            *
701            * @param primaryKey the primary key of this organization
702            */
703            @Override
704            public void setPrimaryKey(long primaryKey) {
705                    _organization.setPrimaryKey(primaryKey);
706            }
707    
708            @Override
709            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
710                    _organization.setPrimaryKeyObj(primaryKeyObj);
711            }
712    
713            /**
714            * Sets whether this organization is recursable.
715            *
716            * @param recursable the recursable of this organization
717            */
718            @Override
719            public void setRecursable(boolean recursable) {
720                    _organization.setRecursable(recursable);
721            }
722    
723            /**
724            * Sets the region ID of this organization.
725            *
726            * @param regionId the region ID of this organization
727            */
728            @Override
729            public void setRegionId(long regionId) {
730                    _organization.setRegionId(regionId);
731            }
732    
733            /**
734            * Sets the status ID of this organization.
735            *
736            * @param statusId the status ID of this organization
737            */
738            @Override
739            public void setStatusId(long statusId) {
740                    _organization.setStatusId(statusId);
741            }
742    
743            /**
744            * Sets the tree path of this organization.
745            *
746            * @param treePath the tree path of this organization
747            */
748            @Override
749            public void setTreePath(java.lang.String treePath) {
750                    _organization.setTreePath(treePath);
751            }
752    
753            /**
754            * Sets the type of this organization.
755            *
756            * @param type the type of this organization
757            */
758            @Override
759            public void setType(java.lang.String type) {
760                    _organization.setType(type);
761            }
762    
763            /**
764            * Sets the user ID of this organization.
765            *
766            * @param userId the user ID of this organization
767            */
768            @Override
769            public void setUserId(long userId) {
770                    _organization.setUserId(userId);
771            }
772    
773            /**
774            * Sets the user name of this organization.
775            *
776            * @param userName the user name of this organization
777            */
778            @Override
779            public void setUserName(java.lang.String userName) {
780                    _organization.setUserName(userName);
781            }
782    
783            /**
784            * Sets the user uuid of this organization.
785            *
786            * @param userUuid the user uuid of this organization
787            */
788            @Override
789            public void setUserUuid(java.lang.String userUuid) {
790                    _organization.setUserUuid(userUuid);
791            }
792    
793            /**
794            * Sets the uuid of this organization.
795            *
796            * @param uuid the uuid of this organization
797            */
798            @Override
799            public void setUuid(java.lang.String uuid) {
800                    _organization.setUuid(uuid);
801            }
802    
803            @Override
804            public CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
805                    return _organization.toCacheModel();
806            }
807    
808            @Override
809            public com.liferay.portal.model.Organization toEscapedModel() {
810                    return new OrganizationWrapper(_organization.toEscapedModel());
811            }
812    
813            @Override
814            public java.lang.String toString() {
815                    return _organization.toString();
816            }
817    
818            @Override
819            public com.liferay.portal.model.Organization toUnescapedModel() {
820                    return new OrganizationWrapper(_organization.toUnescapedModel());
821            }
822    
823            @Override
824            public java.lang.String toXmlString() {
825                    return _organization.toXmlString();
826            }
827    
828            @Override
829            public void updateTreePath(java.lang.String treePath) {
830                    _organization.updateTreePath(treePath);
831            }
832    
833            @Override
834            public boolean equals(Object obj) {
835                    if (this == obj) {
836                            return true;
837                    }
838    
839                    if (!(obj instanceof OrganizationWrapper)) {
840                            return false;
841                    }
842    
843                    OrganizationWrapper organizationWrapper = (OrganizationWrapper)obj;
844    
845                    if (Validator.equals(_organization, organizationWrapper._organization)) {
846                            return true;
847                    }
848    
849                    return false;
850            }
851    
852            @Override
853            public StagedModelType getStagedModelType() {
854                    return _organization.getStagedModelType();
855            }
856    
857            @Override
858            public Organization getWrappedModel() {
859                    return _organization;
860            }
861    
862            @Override
863            public boolean isEntityCacheEnabled() {
864                    return _organization.isEntityCacheEnabled();
865            }
866    
867            @Override
868            public boolean isFinderCacheEnabled() {
869                    return _organization.isFinderCacheEnabled();
870            }
871    
872            @Override
873            public void resetOriginalValues() {
874                    _organization.resetOriginalValues();
875            }
876    
877            private final Organization _organization;
878    }