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