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.lar.StagedModelType;
020    import com.liferay.portal.kernel.util.Validator;
021    
022    import java.util.Date;
023    import java.util.HashMap;
024    import java.util.Map;
025    
026    /**
027     * <p>
028     * This class is a wrapper for {@link Repository}.
029     * </p>
030     *
031     * @author Brian Wing Shun Chan
032     * @see Repository
033     * @generated
034     */
035    @ProviderType
036    public class RepositoryWrapper implements Repository, ModelWrapper<Repository> {
037            public RepositoryWrapper(Repository repository) {
038                    _repository = repository;
039            }
040    
041            @Override
042            public Class<?> getModelClass() {
043                    return Repository.class;
044            }
045    
046            @Override
047            public String getModelClassName() {
048                    return Repository.class.getName();
049            }
050    
051            @Override
052            public Map<String, Object> getModelAttributes() {
053                    Map<String, Object> attributes = new HashMap<String, Object>();
054    
055                    attributes.put("mvccVersion", getMvccVersion());
056                    attributes.put("uuid", getUuid());
057                    attributes.put("repositoryId", getRepositoryId());
058                    attributes.put("groupId", getGroupId());
059                    attributes.put("companyId", getCompanyId());
060                    attributes.put("userId", getUserId());
061                    attributes.put("userName", getUserName());
062                    attributes.put("createDate", getCreateDate());
063                    attributes.put("modifiedDate", getModifiedDate());
064                    attributes.put("classNameId", getClassNameId());
065                    attributes.put("name", getName());
066                    attributes.put("description", getDescription());
067                    attributes.put("portletId", getPortletId());
068                    attributes.put("typeSettings", getTypeSettings());
069                    attributes.put("dlFolderId", getDlFolderId());
070    
071                    return attributes;
072            }
073    
074            @Override
075            public void setModelAttributes(Map<String, Object> attributes) {
076                    Long mvccVersion = (Long)attributes.get("mvccVersion");
077    
078                    if (mvccVersion != null) {
079                            setMvccVersion(mvccVersion);
080                    }
081    
082                    String uuid = (String)attributes.get("uuid");
083    
084                    if (uuid != null) {
085                            setUuid(uuid);
086                    }
087    
088                    Long repositoryId = (Long)attributes.get("repositoryId");
089    
090                    if (repositoryId != null) {
091                            setRepositoryId(repositoryId);
092                    }
093    
094                    Long groupId = (Long)attributes.get("groupId");
095    
096                    if (groupId != null) {
097                            setGroupId(groupId);
098                    }
099    
100                    Long companyId = (Long)attributes.get("companyId");
101    
102                    if (companyId != null) {
103                            setCompanyId(companyId);
104                    }
105    
106                    Long userId = (Long)attributes.get("userId");
107    
108                    if (userId != null) {
109                            setUserId(userId);
110                    }
111    
112                    String userName = (String)attributes.get("userName");
113    
114                    if (userName != null) {
115                            setUserName(userName);
116                    }
117    
118                    Date createDate = (Date)attributes.get("createDate");
119    
120                    if (createDate != null) {
121                            setCreateDate(createDate);
122                    }
123    
124                    Date modifiedDate = (Date)attributes.get("modifiedDate");
125    
126                    if (modifiedDate != null) {
127                            setModifiedDate(modifiedDate);
128                    }
129    
130                    Long classNameId = (Long)attributes.get("classNameId");
131    
132                    if (classNameId != null) {
133                            setClassNameId(classNameId);
134                    }
135    
136                    String name = (String)attributes.get("name");
137    
138                    if (name != null) {
139                            setName(name);
140                    }
141    
142                    String description = (String)attributes.get("description");
143    
144                    if (description != null) {
145                            setDescription(description);
146                    }
147    
148                    String portletId = (String)attributes.get("portletId");
149    
150                    if (portletId != null) {
151                            setPortletId(portletId);
152                    }
153    
154                    String typeSettings = (String)attributes.get("typeSettings");
155    
156                    if (typeSettings != null) {
157                            setTypeSettings(typeSettings);
158                    }
159    
160                    Long dlFolderId = (Long)attributes.get("dlFolderId");
161    
162                    if (dlFolderId != null) {
163                            setDlFolderId(dlFolderId);
164                    }
165            }
166    
167            @Override
168            public java.lang.Object clone() {
169                    return new RepositoryWrapper((Repository)_repository.clone());
170            }
171    
172            @Override
173            public int compareTo(com.liferay.portal.model.Repository repository) {
174                    return _repository.compareTo(repository);
175            }
176    
177            /**
178            * Returns the fully qualified class name of this repository.
179            *
180            * @return the fully qualified class name of this repository
181            */
182            @Override
183            public java.lang.String getClassName() {
184                    return _repository.getClassName();
185            }
186    
187            /**
188            * Returns the class name ID of this repository.
189            *
190            * @return the class name ID of this repository
191            */
192            @Override
193            public long getClassNameId() {
194                    return _repository.getClassNameId();
195            }
196    
197            /**
198            * Returns the company ID of this repository.
199            *
200            * @return the company ID of this repository
201            */
202            @Override
203            public long getCompanyId() {
204                    return _repository.getCompanyId();
205            }
206    
207            /**
208            * Returns the create date of this repository.
209            *
210            * @return the create date of this repository
211            */
212            @Override
213            public java.util.Date getCreateDate() {
214                    return _repository.getCreateDate();
215            }
216    
217            /**
218            * Returns the description of this repository.
219            *
220            * @return the description of this repository
221            */
222            @Override
223            public java.lang.String getDescription() {
224                    return _repository.getDescription();
225            }
226    
227            /**
228            * Returns the dl folder ID of this repository.
229            *
230            * @return the dl folder ID of this repository
231            */
232            @Override
233            public long getDlFolderId() {
234                    return _repository.getDlFolderId();
235            }
236    
237            @Override
238            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
239                    return _repository.getExpandoBridge();
240            }
241    
242            /**
243            * Returns the group ID of this repository.
244            *
245            * @return the group ID of this repository
246            */
247            @Override
248            public long getGroupId() {
249                    return _repository.getGroupId();
250            }
251    
252            /**
253            * Returns the modified date of this repository.
254            *
255            * @return the modified date of this repository
256            */
257            @Override
258            public java.util.Date getModifiedDate() {
259                    return _repository.getModifiedDate();
260            }
261    
262            /**
263            * Returns the mvcc version of this repository.
264            *
265            * @return the mvcc version of this repository
266            */
267            @Override
268            public long getMvccVersion() {
269                    return _repository.getMvccVersion();
270            }
271    
272            /**
273            * Returns the name of this repository.
274            *
275            * @return the name of this repository
276            */
277            @Override
278            public java.lang.String getName() {
279                    return _repository.getName();
280            }
281    
282            /**
283            * Returns the portlet ID of this repository.
284            *
285            * @return the portlet ID of this repository
286            */
287            @Override
288            public java.lang.String getPortletId() {
289                    return _repository.getPortletId();
290            }
291    
292            /**
293            * Returns the primary key of this repository.
294            *
295            * @return the primary key of this repository
296            */
297            @Override
298            public long getPrimaryKey() {
299                    return _repository.getPrimaryKey();
300            }
301    
302            @Override
303            public java.io.Serializable getPrimaryKeyObj() {
304                    return _repository.getPrimaryKeyObj();
305            }
306    
307            /**
308            * Returns the repository ID of this repository.
309            *
310            * @return the repository ID of this repository
311            */
312            @Override
313            public long getRepositoryId() {
314                    return _repository.getRepositoryId();
315            }
316    
317            /**
318            * Returns the type settings of this repository.
319            *
320            * @return the type settings of this repository
321            */
322            @Override
323            public java.lang.String getTypeSettings() {
324                    return _repository.getTypeSettings();
325            }
326    
327            @Override
328            public com.liferay.portal.kernel.util.UnicodeProperties getTypeSettingsProperties() {
329                    return _repository.getTypeSettingsProperties();
330            }
331    
332            /**
333            * Returns the user ID of this repository.
334            *
335            * @return the user ID of this repository
336            */
337            @Override
338            public long getUserId() {
339                    return _repository.getUserId();
340            }
341    
342            /**
343            * Returns the user name of this repository.
344            *
345            * @return the user name of this repository
346            */
347            @Override
348            public java.lang.String getUserName() {
349                    return _repository.getUserName();
350            }
351    
352            /**
353            * Returns the user uuid of this repository.
354            *
355            * @return the user uuid of this repository
356            */
357            @Override
358            public java.lang.String getUserUuid() {
359                    return _repository.getUserUuid();
360            }
361    
362            /**
363            * Returns the uuid of this repository.
364            *
365            * @return the uuid of this repository
366            */
367            @Override
368            public java.lang.String getUuid() {
369                    return _repository.getUuid();
370            }
371    
372            @Override
373            public int hashCode() {
374                    return _repository.hashCode();
375            }
376    
377            @Override
378            public boolean isCachedModel() {
379                    return _repository.isCachedModel();
380            }
381    
382            @Override
383            public boolean isEscapedModel() {
384                    return _repository.isEscapedModel();
385            }
386    
387            @Override
388            public boolean isNew() {
389                    return _repository.isNew();
390            }
391    
392            @Override
393            public void persist() {
394                    _repository.persist();
395            }
396    
397            @Override
398            public void setCachedModel(boolean cachedModel) {
399                    _repository.setCachedModel(cachedModel);
400            }
401    
402            @Override
403            public void setClassName(java.lang.String className) {
404                    _repository.setClassName(className);
405            }
406    
407            /**
408            * Sets the class name ID of this repository.
409            *
410            * @param classNameId the class name ID of this repository
411            */
412            @Override
413            public void setClassNameId(long classNameId) {
414                    _repository.setClassNameId(classNameId);
415            }
416    
417            /**
418            * Sets the company ID of this repository.
419            *
420            * @param companyId the company ID of this repository
421            */
422            @Override
423            public void setCompanyId(long companyId) {
424                    _repository.setCompanyId(companyId);
425            }
426    
427            /**
428            * Sets the create date of this repository.
429            *
430            * @param createDate the create date of this repository
431            */
432            @Override
433            public void setCreateDate(java.util.Date createDate) {
434                    _repository.setCreateDate(createDate);
435            }
436    
437            /**
438            * Sets the description of this repository.
439            *
440            * @param description the description of this repository
441            */
442            @Override
443            public void setDescription(java.lang.String description) {
444                    _repository.setDescription(description);
445            }
446    
447            /**
448            * Sets the dl folder ID of this repository.
449            *
450            * @param dlFolderId the dl folder ID of this repository
451            */
452            @Override
453            public void setDlFolderId(long dlFolderId) {
454                    _repository.setDlFolderId(dlFolderId);
455            }
456    
457            @Override
458            public void setExpandoBridgeAttributes(
459                    com.liferay.portal.model.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(java.util.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 com.liferay.portal.model.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    }