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