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