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