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.repository.proxy;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.repository.model.FileEntry;
020    import com.liferay.portal.kernel.repository.model.FileVersion;
021    import com.liferay.portlet.expando.model.ExpandoBridge;
022    
023    import java.io.InputStream;
024    import java.io.Serializable;
025    
026    import java.util.Date;
027    import java.util.Map;
028    
029    /**
030     * @author Mika Koivisto
031     */
032    public class FileVersionProxyBean
033            extends RepositoryModelProxyBean implements FileVersion {
034    
035            public FileVersionProxyBean(
036                    FileVersion fileVersion, ClassLoader classLoader) {
037    
038                    super(classLoader);
039    
040                    _fileVersion = fileVersion;
041            }
042    
043            @Override
044            public Map<String, Serializable> getAttributes() {
045                    return _fileVersion.getAttributes();
046            }
047    
048            @Override
049            public String getChangeLog() {
050                    return _fileVersion.getChangeLog();
051            }
052    
053            @Override
054            public long getCompanyId() {
055                    return _fileVersion.getCompanyId();
056            }
057    
058            @Override
059            public InputStream getContentStream(boolean incrementCounter)
060                    throws PortalException, SystemException {
061    
062                    return _fileVersion.getContentStream(incrementCounter);
063            }
064    
065            @Override
066            public Date getCreateDate() {
067                    return _fileVersion.getCreateDate();
068            }
069    
070            @Override
071            public String getDescription() {
072                    return _fileVersion.getDescription();
073            }
074    
075            @Override
076            public ExpandoBridge getExpandoBridge() {
077                    ExpandoBridge expandoBridge = _fileVersion.getExpandoBridge();
078    
079                    return (ExpandoBridge)newProxyInstance(
080                            expandoBridge, ExpandoBridge.class);
081            }
082    
083            @Override
084            public String getExtension() {
085                    return _fileVersion.getExtension();
086            }
087    
088            @Override
089            public String getExtraSettings() {
090                    return _fileVersion.getExtraSettings();
091            }
092    
093            @Override
094            public FileEntry getFileEntry() throws PortalException, SystemException {
095                    FileEntry fileEntry = _fileVersion.getFileEntry();
096    
097                    return newFileEntryProxyBean(fileEntry);
098            }
099    
100            @Override
101            public long getFileEntryId() {
102                    return _fileVersion.getFileEntryId();
103            }
104    
105            @Override
106            public long getFileVersionId() {
107                    return _fileVersion.getFileVersionId();
108            }
109    
110            @Override
111            public long getGroupId() {
112                    return _fileVersion.getGroupId();
113            }
114    
115            @Override
116            public String getIcon() {
117                    return _fileVersion.getIcon();
118            }
119    
120            @Override
121            public String getMimeType() {
122                    return _fileVersion.getMimeType();
123            }
124    
125            @Override
126            public Object getModel() {
127                    return _fileVersion.getModel();
128            }
129    
130            @Override
131            public Class<?> getModelClass() {
132                    return _fileVersion.getModelClass();
133            }
134    
135            @Override
136            public String getModelClassName() {
137                    return _fileVersion.getModelClassName();
138            }
139    
140            @Override
141            public Date getModifiedDate() {
142                    return _fileVersion.getModifiedDate();
143            }
144    
145            @Override
146            public long getPrimaryKey() {
147                    return _fileVersion.getPrimaryKey();
148            }
149    
150            @Override
151            public Serializable getPrimaryKeyObj() {
152                    return _fileVersion.getPrimaryKeyObj();
153            }
154    
155            @Override
156            public long getRepositoryId() {
157                    return _fileVersion.getRepositoryId();
158            }
159    
160            @Override
161            public long getSize() {
162                    return _fileVersion.getSize();
163            }
164    
165            @Override
166            public int getStatus() {
167                    return _fileVersion.getStatus();
168            }
169    
170            @Override
171            public long getStatusByUserId() {
172                    return _fileVersion.getStatusByUserId();
173            }
174    
175            @Override
176            public String getStatusByUserName() {
177                    return _fileVersion.getStatusByUserName();
178            }
179    
180            @Override
181            public String getStatusByUserUuid() throws SystemException {
182                    return _fileVersion.getStatusByUserUuid();
183            }
184    
185            @Override
186            public Date getStatusDate() {
187                    return _fileVersion.getStatusDate();
188            }
189    
190            @Override
191            public String getTitle() {
192                    return _fileVersion.getTitle();
193            }
194    
195            @Override
196            public long getUserId() {
197                    return _fileVersion.getUserId();
198            }
199    
200            @Override
201            public String getUserName() {
202                    return _fileVersion.getUserName();
203            }
204    
205            @Override
206            public String getUserUuid() throws SystemException {
207                    return _fileVersion.getUserUuid();
208            }
209    
210            @Override
211            public String getUuid() {
212                    return _fileVersion.getUuid();
213            }
214    
215            @Override
216            public String getVersion() {
217                    return _fileVersion.getVersion();
218            }
219    
220            @Override
221            public boolean isApproved() {
222                    return _fileVersion.isApproved();
223            }
224    
225            @Override
226            public boolean isDefaultRepository() {
227                    return _fileVersion.isDefaultRepository();
228            }
229    
230            @Override
231            public boolean isDraft() {
232                    return _fileVersion.isDraft();
233            }
234    
235            @Override
236            public boolean isEscapedModel() {
237                    return _fileVersion.isEscapedModel();
238            }
239    
240            @Override
241            public boolean isExpired() {
242                    return _fileVersion.isExpired();
243            }
244    
245            @Override
246            public boolean isPending() {
247                    return _fileVersion.isPending();
248            }
249    
250            @Override
251            public void setCompanyId(long companyId) {
252                    _fileVersion.setCompanyId(companyId);
253            }
254    
255            @Override
256            public void setCreateDate(Date date) {
257                    _fileVersion.setCreateDate(date);
258            }
259    
260            @Override
261            public void setGroupId(long groupId) {
262                    _fileVersion.setGroupId(groupId);
263            }
264    
265            @Override
266            public void setModifiedDate(Date date) {
267                    _fileVersion.setModifiedDate(date);
268            }
269    
270            @Override
271            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
272                    _fileVersion.setPrimaryKeyObj(primaryKeyObj);
273            }
274    
275            @Override
276            public void setUserId(long userId) {
277                    _fileVersion.setUserId(userId);
278            }
279    
280            @Override
281            public void setUserName(String userName) {
282                    _fileVersion.setUserName(userName);
283            }
284    
285            @Override
286            public void setUserUuid(String userUuid) {
287                    _fileVersion.setUserUuid(userUuid);
288            }
289    
290            @Override
291            public FileVersion toEscapedModel() {
292                    FileVersion fileVersion = _fileVersion.toEscapedModel();
293    
294                    return newFileVersionProxyBean(fileVersion);
295            }
296    
297            @Override
298            public FileVersion toUnescapedModel() {
299                    FileVersion fileVersion = _fileVersion.toUnescapedModel();
300    
301                    return newFileVersionProxyBean(fileVersion);
302            }
303    
304            private FileVersion _fileVersion;
305    
306    }