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