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