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.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link RepositoryEntry}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       RepositoryEntry
029     * @generated
030     */
031    public class RepositoryEntryWrapper implements RepositoryEntry,
032            ModelWrapper<RepositoryEntry> {
033            public RepositoryEntryWrapper(RepositoryEntry repositoryEntry) {
034                    _repositoryEntry = repositoryEntry;
035            }
036    
037            public Class<?> getModelClass() {
038                    return RepositoryEntry.class;
039            }
040    
041            public String getModelClassName() {
042                    return RepositoryEntry.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("repositoryEntryId", getRepositoryEntryId());
050                    attributes.put("groupId", getGroupId());
051                    attributes.put("repositoryId", getRepositoryId());
052                    attributes.put("mappedId", getMappedId());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    String uuid = (String)attributes.get("uuid");
059    
060                    if (uuid != null) {
061                            setUuid(uuid);
062                    }
063    
064                    Long repositoryEntryId = (Long)attributes.get("repositoryEntryId");
065    
066                    if (repositoryEntryId != null) {
067                            setRepositoryEntryId(repositoryEntryId);
068                    }
069    
070                    Long groupId = (Long)attributes.get("groupId");
071    
072                    if (groupId != null) {
073                            setGroupId(groupId);
074                    }
075    
076                    Long repositoryId = (Long)attributes.get("repositoryId");
077    
078                    if (repositoryId != null) {
079                            setRepositoryId(repositoryId);
080                    }
081    
082                    String mappedId = (String)attributes.get("mappedId");
083    
084                    if (mappedId != null) {
085                            setMappedId(mappedId);
086                    }
087            }
088    
089            /**
090            * Returns the primary key of this repository entry.
091            *
092            * @return the primary key of this repository entry
093            */
094            public long getPrimaryKey() {
095                    return _repositoryEntry.getPrimaryKey();
096            }
097    
098            /**
099            * Sets the primary key of this repository entry.
100            *
101            * @param primaryKey the primary key of this repository entry
102            */
103            public void setPrimaryKey(long primaryKey) {
104                    _repositoryEntry.setPrimaryKey(primaryKey);
105            }
106    
107            /**
108            * Returns the uuid of this repository entry.
109            *
110            * @return the uuid of this repository entry
111            */
112            public java.lang.String getUuid() {
113                    return _repositoryEntry.getUuid();
114            }
115    
116            /**
117            * Sets the uuid of this repository entry.
118            *
119            * @param uuid the uuid of this repository entry
120            */
121            public void setUuid(java.lang.String uuid) {
122                    _repositoryEntry.setUuid(uuid);
123            }
124    
125            /**
126            * Returns the repository entry ID of this repository entry.
127            *
128            * @return the repository entry ID of this repository entry
129            */
130            public long getRepositoryEntryId() {
131                    return _repositoryEntry.getRepositoryEntryId();
132            }
133    
134            /**
135            * Sets the repository entry ID of this repository entry.
136            *
137            * @param repositoryEntryId the repository entry ID of this repository entry
138            */
139            public void setRepositoryEntryId(long repositoryEntryId) {
140                    _repositoryEntry.setRepositoryEntryId(repositoryEntryId);
141            }
142    
143            /**
144            * Returns the group ID of this repository entry.
145            *
146            * @return the group ID of this repository entry
147            */
148            public long getGroupId() {
149                    return _repositoryEntry.getGroupId();
150            }
151    
152            /**
153            * Sets the group ID of this repository entry.
154            *
155            * @param groupId the group ID of this repository entry
156            */
157            public void setGroupId(long groupId) {
158                    _repositoryEntry.setGroupId(groupId);
159            }
160    
161            /**
162            * Returns the repository ID of this repository entry.
163            *
164            * @return the repository ID of this repository entry
165            */
166            public long getRepositoryId() {
167                    return _repositoryEntry.getRepositoryId();
168            }
169    
170            /**
171            * Sets the repository ID of this repository entry.
172            *
173            * @param repositoryId the repository ID of this repository entry
174            */
175            public void setRepositoryId(long repositoryId) {
176                    _repositoryEntry.setRepositoryId(repositoryId);
177            }
178    
179            /**
180            * Returns the mapped ID of this repository entry.
181            *
182            * @return the mapped ID of this repository entry
183            */
184            public java.lang.String getMappedId() {
185                    return _repositoryEntry.getMappedId();
186            }
187    
188            /**
189            * Sets the mapped ID of this repository entry.
190            *
191            * @param mappedId the mapped ID of this repository entry
192            */
193            public void setMappedId(java.lang.String mappedId) {
194                    _repositoryEntry.setMappedId(mappedId);
195            }
196    
197            public boolean isNew() {
198                    return _repositoryEntry.isNew();
199            }
200    
201            public void setNew(boolean n) {
202                    _repositoryEntry.setNew(n);
203            }
204    
205            public boolean isCachedModel() {
206                    return _repositoryEntry.isCachedModel();
207            }
208    
209            public void setCachedModel(boolean cachedModel) {
210                    _repositoryEntry.setCachedModel(cachedModel);
211            }
212    
213            public boolean isEscapedModel() {
214                    return _repositoryEntry.isEscapedModel();
215            }
216    
217            public java.io.Serializable getPrimaryKeyObj() {
218                    return _repositoryEntry.getPrimaryKeyObj();
219            }
220    
221            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
222                    _repositoryEntry.setPrimaryKeyObj(primaryKeyObj);
223            }
224    
225            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
226                    return _repositoryEntry.getExpandoBridge();
227            }
228    
229            public void setExpandoBridgeAttributes(
230                    com.liferay.portal.service.ServiceContext serviceContext) {
231                    _repositoryEntry.setExpandoBridgeAttributes(serviceContext);
232            }
233    
234            @Override
235            public java.lang.Object clone() {
236                    return new RepositoryEntryWrapper((RepositoryEntry)_repositoryEntry.clone());
237            }
238    
239            public int compareTo(
240                    com.liferay.portal.model.RepositoryEntry repositoryEntry) {
241                    return _repositoryEntry.compareTo(repositoryEntry);
242            }
243    
244            @Override
245            public int hashCode() {
246                    return _repositoryEntry.hashCode();
247            }
248    
249            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.RepositoryEntry> toCacheModel() {
250                    return _repositoryEntry.toCacheModel();
251            }
252    
253            public com.liferay.portal.model.RepositoryEntry toEscapedModel() {
254                    return new RepositoryEntryWrapper(_repositoryEntry.toEscapedModel());
255            }
256    
257            public com.liferay.portal.model.RepositoryEntry toUnescapedModel() {
258                    return new RepositoryEntryWrapper(_repositoryEntry.toUnescapedModel());
259            }
260    
261            @Override
262            public java.lang.String toString() {
263                    return _repositoryEntry.toString();
264            }
265    
266            public java.lang.String toXmlString() {
267                    return _repositoryEntry.toXmlString();
268            }
269    
270            public void persist()
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    _repositoryEntry.persist();
273            }
274    
275            @Override
276            public boolean equals(Object obj) {
277                    if (this == obj) {
278                            return true;
279                    }
280    
281                    if (!(obj instanceof RepositoryEntryWrapper)) {
282                            return false;
283                    }
284    
285                    RepositoryEntryWrapper repositoryEntryWrapper = (RepositoryEntryWrapper)obj;
286    
287                    if (Validator.equals(_repositoryEntry,
288                                            repositoryEntryWrapper._repositoryEntry)) {
289                            return true;
290                    }
291    
292                    return false;
293            }
294    
295            /**
296             * @deprecated Renamed to {@link #getWrappedModel}
297             */
298            public RepositoryEntry getWrappedRepositoryEntry() {
299                    return _repositoryEntry;
300            }
301    
302            public RepositoryEntry getWrappedModel() {
303                    return _repositoryEntry;
304            }
305    
306            public void resetOriginalValues() {
307                    _repositoryEntry.resetOriginalValues();
308            }
309    
310            private RepositoryEntry _repositoryEntry;
311    }