001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class OrganizationWrapper implements Organization,
032 ModelWrapper<Organization> {
033 public OrganizationWrapper(Organization organization) {
034 _organization = organization;
035 }
036
037 public Class<?> getModelClass() {
038 return Organization.class;
039 }
040
041 public String getModelClassName() {
042 return Organization.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("organizationId", getOrganizationId());
049 attributes.put("companyId", getCompanyId());
050 attributes.put("parentOrganizationId", getParentOrganizationId());
051 attributes.put("treePath", getTreePath());
052 attributes.put("name", getName());
053 attributes.put("type", getType());
054 attributes.put("recursable", getRecursable());
055 attributes.put("regionId", getRegionId());
056 attributes.put("countryId", getCountryId());
057 attributes.put("statusId", getStatusId());
058 attributes.put("comments", getComments());
059
060 return attributes;
061 }
062
063 public void setModelAttributes(Map<String, Object> attributes) {
064 Long organizationId = (Long)attributes.get("organizationId");
065
066 if (organizationId != null) {
067 setOrganizationId(organizationId);
068 }
069
070 Long companyId = (Long)attributes.get("companyId");
071
072 if (companyId != null) {
073 setCompanyId(companyId);
074 }
075
076 Long parentOrganizationId = (Long)attributes.get("parentOrganizationId");
077
078 if (parentOrganizationId != null) {
079 setParentOrganizationId(parentOrganizationId);
080 }
081
082 String treePath = (String)attributes.get("treePath");
083
084 if (treePath != null) {
085 setTreePath(treePath);
086 }
087
088 String name = (String)attributes.get("name");
089
090 if (name != null) {
091 setName(name);
092 }
093
094 String type = (String)attributes.get("type");
095
096 if (type != null) {
097 setType(type);
098 }
099
100 Boolean recursable = (Boolean)attributes.get("recursable");
101
102 if (recursable != null) {
103 setRecursable(recursable);
104 }
105
106 Long regionId = (Long)attributes.get("regionId");
107
108 if (regionId != null) {
109 setRegionId(regionId);
110 }
111
112 Long countryId = (Long)attributes.get("countryId");
113
114 if (countryId != null) {
115 setCountryId(countryId);
116 }
117
118 Integer statusId = (Integer)attributes.get("statusId");
119
120 if (statusId != null) {
121 setStatusId(statusId);
122 }
123
124 String comments = (String)attributes.get("comments");
125
126 if (comments != null) {
127 setComments(comments);
128 }
129 }
130
131
136 public long getPrimaryKey() {
137 return _organization.getPrimaryKey();
138 }
139
140
145 public void setPrimaryKey(long primaryKey) {
146 _organization.setPrimaryKey(primaryKey);
147 }
148
149
154 public long getOrganizationId() {
155 return _organization.getOrganizationId();
156 }
157
158
163 public void setOrganizationId(long organizationId) {
164 _organization.setOrganizationId(organizationId);
165 }
166
167
172 public long getCompanyId() {
173 return _organization.getCompanyId();
174 }
175
176
181 public void setCompanyId(long companyId) {
182 _organization.setCompanyId(companyId);
183 }
184
185
190 public long getParentOrganizationId() {
191 return _organization.getParentOrganizationId();
192 }
193
194
199 public void setParentOrganizationId(long parentOrganizationId) {
200 _organization.setParentOrganizationId(parentOrganizationId);
201 }
202
203
208 public java.lang.String getTreePath() {
209 return _organization.getTreePath();
210 }
211
212
217 public void setTreePath(java.lang.String treePath) {
218 _organization.setTreePath(treePath);
219 }
220
221
226 public java.lang.String getName() {
227 return _organization.getName();
228 }
229
230
235 public void setName(java.lang.String name) {
236 _organization.setName(name);
237 }
238
239
244 public java.lang.String getType() {
245 return _organization.getType();
246 }
247
248
253 public void setType(java.lang.String type) {
254 _organization.setType(type);
255 }
256
257
262 public boolean getRecursable() {
263 return _organization.getRecursable();
264 }
265
266
271 public boolean isRecursable() {
272 return _organization.isRecursable();
273 }
274
275
280 public void setRecursable(boolean recursable) {
281 _organization.setRecursable(recursable);
282 }
283
284
289 public long getRegionId() {
290 return _organization.getRegionId();
291 }
292
293
298 public void setRegionId(long regionId) {
299 _organization.setRegionId(regionId);
300 }
301
302
307 public long getCountryId() {
308 return _organization.getCountryId();
309 }
310
311
316 public void setCountryId(long countryId) {
317 _organization.setCountryId(countryId);
318 }
319
320
325 public int getStatusId() {
326 return _organization.getStatusId();
327 }
328
329
334 public void setStatusId(int statusId) {
335 _organization.setStatusId(statusId);
336 }
337
338
343 public java.lang.String getComments() {
344 return _organization.getComments();
345 }
346
347
352 public void setComments(java.lang.String comments) {
353 _organization.setComments(comments);
354 }
355
356 public boolean isNew() {
357 return _organization.isNew();
358 }
359
360 public void setNew(boolean n) {
361 _organization.setNew(n);
362 }
363
364 public boolean isCachedModel() {
365 return _organization.isCachedModel();
366 }
367
368 public void setCachedModel(boolean cachedModel) {
369 _organization.setCachedModel(cachedModel);
370 }
371
372 public boolean isEscapedModel() {
373 return _organization.isEscapedModel();
374 }
375
376 public java.io.Serializable getPrimaryKeyObj() {
377 return _organization.getPrimaryKeyObj();
378 }
379
380 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
381 _organization.setPrimaryKeyObj(primaryKeyObj);
382 }
383
384 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
385 return _organization.getExpandoBridge();
386 }
387
388 public void setExpandoBridgeAttributes(
389 com.liferay.portal.service.ServiceContext serviceContext) {
390 _organization.setExpandoBridgeAttributes(serviceContext);
391 }
392
393 @Override
394 public java.lang.Object clone() {
395 return new OrganizationWrapper((Organization)_organization.clone());
396 }
397
398 public int compareTo(com.liferay.portal.model.Organization organization) {
399 return _organization.compareTo(organization);
400 }
401
402 @Override
403 public int hashCode() {
404 return _organization.hashCode();
405 }
406
407 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Organization> toCacheModel() {
408 return _organization.toCacheModel();
409 }
410
411 public com.liferay.portal.model.Organization toEscapedModel() {
412 return new OrganizationWrapper(_organization.toEscapedModel());
413 }
414
415 public com.liferay.portal.model.Organization toUnescapedModel() {
416 return new OrganizationWrapper(_organization.toUnescapedModel());
417 }
418
419 @Override
420 public java.lang.String toString() {
421 return _organization.toString();
422 }
423
424 public java.lang.String toXmlString() {
425 return _organization.toXmlString();
426 }
427
428 public void persist()
429 throws com.liferay.portal.kernel.exception.SystemException {
430 _organization.persist();
431 }
432
433 public java.lang.String buildTreePath()
434 throws com.liferay.portal.kernel.exception.PortalException,
435 com.liferay.portal.kernel.exception.SystemException {
436 return _organization.buildTreePath();
437 }
438
439 public com.liferay.portal.model.Address getAddress() {
440 return _organization.getAddress();
441 }
442
443 public java.util.List<com.liferay.portal.model.Address> getAddresses()
444 throws com.liferay.portal.kernel.exception.SystemException {
445 return _organization.getAddresses();
446 }
447
448 public java.util.List<com.liferay.portal.model.Organization> getAncestors()
449 throws com.liferay.portal.kernel.exception.PortalException,
450 com.liferay.portal.kernel.exception.SystemException {
451 return _organization.getAncestors();
452 }
453
454 public java.lang.String[] getChildrenTypes() {
455 return _organization.getChildrenTypes();
456 }
457
458 public java.util.List<com.liferay.portal.model.Organization> getDescendants()
459 throws com.liferay.portal.kernel.exception.SystemException {
460 return _organization.getDescendants();
461 }
462
463 public com.liferay.portal.model.Group getGroup() {
464 return _organization.getGroup();
465 }
466
467 public long getGroupId() {
468 return _organization.getGroupId();
469 }
470
471 public long getLogoId() {
472 return _organization.getLogoId();
473 }
474
475 public com.liferay.portal.model.Organization getParentOrganization()
476 throws com.liferay.portal.kernel.exception.PortalException,
477 com.liferay.portal.kernel.exception.SystemException {
478 return _organization.getParentOrganization();
479 }
480
481 public javax.portlet.PortletPreferences getPreferences()
482 throws com.liferay.portal.kernel.exception.SystemException {
483 return _organization.getPreferences();
484 }
485
486 public int getPrivateLayoutsPageCount() {
487 return _organization.getPrivateLayoutsPageCount();
488 }
489
490 public int getPublicLayoutsPageCount() {
491 return _organization.getPublicLayoutsPageCount();
492 }
493
494 public java.util.Set<java.lang.String> getReminderQueryQuestions(
495 java.util.Locale locale)
496 throws com.liferay.portal.kernel.exception.SystemException {
497 return _organization.getReminderQueryQuestions(locale);
498 }
499
500 public java.util.Set<java.lang.String> getReminderQueryQuestions(
501 java.lang.String languageId)
502 throws com.liferay.portal.kernel.exception.SystemException {
503 return _organization.getReminderQueryQuestions(languageId);
504 }
505
506 public java.util.List<com.liferay.portal.model.Organization> getSuborganizations()
507 throws com.liferay.portal.kernel.exception.SystemException {
508 return _organization.getSuborganizations();
509 }
510
511 public int getSuborganizationsSize()
512 throws com.liferay.portal.kernel.exception.SystemException {
513 return _organization.getSuborganizationsSize();
514 }
515
516 public int getTypeOrder() {
517 return _organization.getTypeOrder();
518 }
519
520 public boolean hasPrivateLayouts() {
521 return _organization.hasPrivateLayouts();
522 }
523
524 public boolean hasPublicLayouts() {
525 return _organization.hasPublicLayouts();
526 }
527
528 public boolean hasSuborganizations()
529 throws com.liferay.portal.kernel.exception.SystemException {
530 return _organization.hasSuborganizations();
531 }
532
533 public boolean isParentable() {
534 return _organization.isParentable();
535 }
536
537 public boolean isRoot() {
538 return _organization.isRoot();
539 }
540
541 @Override
542 public boolean equals(Object obj) {
543 if (this == obj) {
544 return true;
545 }
546
547 if (!(obj instanceof OrganizationWrapper)) {
548 return false;
549 }
550
551 OrganizationWrapper organizationWrapper = (OrganizationWrapper)obj;
552
553 if (Validator.equals(_organization, organizationWrapper._organization)) {
554 return true;
555 }
556
557 return false;
558 }
559
560
563 public Organization getWrappedOrganization() {
564 return _organization;
565 }
566
567 public Organization getWrappedModel() {
568 return _organization;
569 }
570
571 public void resetOriginalValues() {
572 _organization.resetOriginalValues();
573 }
574
575 private Organization _organization;
576 }