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