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