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