001    /**
002     * Copyright (c) 2000-2012 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            public Map<String, Serializable> getAttributes() {
044                    return _fileVersion.getAttributes();
045            }
046    
047            public String getChangeLog() {
048                    return _fileVersion.getChangeLog();
049            }
050    
051            public long getCompanyId() {
052                    return _fileVersion.getCompanyId();
053            }
054    
055            public InputStream getContentStream(boolean incrementCounter)
056                    throws PortalException, SystemException {
057    
058                    return _fileVersion.getContentStream(incrementCounter);
059            }
060    
061            public Date getCreateDate() {
062                    return _fileVersion.getCreateDate();
063            }
064    
065            public String getDescription() {
066                    return _fileVersion.getDescription();
067            }
068    
069            public ExpandoBridge getExpandoBridge() {
070                    ExpandoBridge expandoBridge = _fileVersion.getExpandoBridge();
071    
072                    return (ExpandoBridge)newProxyInstance(
073                            expandoBridge, ExpandoBridge.class);
074            }
075    
076            public String getExtension() {
077                    return _fileVersion.getExtension();
078            }
079    
080            public String getExtraSettings() {
081                    return _fileVersion.getExtraSettings();
082            }
083    
084            public FileEntry getFileEntry() throws PortalException, SystemException {
085                    FileEntry fileEntry = _fileVersion.getFileEntry();
086    
087                    return newFileEntryProxyBean(fileEntry);
088            }
089    
090            public long getFileEntryId() {
091                    return _fileVersion.getFileEntryId();
092            }
093    
094            public long getFileVersionId() {
095                    return _fileVersion.getFileVersionId();
096            }
097    
098            public long getGroupId() {
099                    return _fileVersion.getGroupId();
100            }
101    
102            public String getIcon() {
103                    return _fileVersion.getIcon();
104            }
105    
106            public String getMimeType() {
107                    return _fileVersion.getMimeType();
108            }
109    
110            public Object getModel() {
111                    return _fileVersion.getModel();
112            }
113    
114            public Class<?> getModelClass() {
115                    return _fileVersion.getModelClass();
116            }
117    
118            public String getModelClassName() {
119                    return _fileVersion.getModelClassName();
120            }
121    
122            public Date getModifiedDate() {
123                    return _fileVersion.getModifiedDate();
124            }
125    
126            public long getPrimaryKey() {
127                    return _fileVersion.getPrimaryKey();
128            }
129    
130            public Serializable getPrimaryKeyObj() {
131                    return _fileVersion.getPrimaryKeyObj();
132            }
133    
134            public long getRepositoryId() {
135                    return _fileVersion.getRepositoryId();
136            }
137    
138            public long getSize() {
139                    return _fileVersion.getSize();
140            }
141    
142            public int getStatus() {
143                    return _fileVersion.getStatus();
144            }
145    
146            public long getStatusByUserId() {
147                    return _fileVersion.getStatusByUserId();
148            }
149    
150            public String getStatusByUserName() {
151                    return _fileVersion.getStatusByUserName();
152            }
153    
154            public String getStatusByUserUuid() throws SystemException {
155                    return _fileVersion.getStatusByUserUuid();
156            }
157    
158            public Date getStatusDate() {
159                    return _fileVersion.getStatusDate();
160            }
161    
162            public String getTitle() {
163                    return _fileVersion.getTitle();
164            }
165    
166            public long getUserId() {
167                    return _fileVersion.getUserId();
168            }
169    
170            public String getUserName() {
171                    return _fileVersion.getUserName();
172            }
173    
174            public String getUserUuid() throws SystemException {
175                    return _fileVersion.getUserUuid();
176            }
177    
178            public String getUuid() {
179                    return _fileVersion.getUuid();
180            }
181    
182            public String getVersion() {
183                    return _fileVersion.getVersion();
184            }
185    
186            public boolean isApproved() {
187                    return _fileVersion.isApproved();
188            }
189    
190            public boolean isDefaultRepository() {
191                    return _fileVersion.isDefaultRepository();
192            }
193    
194            public boolean isDraft() {
195                    return _fileVersion.isDraft();
196            }
197    
198            public boolean isEscapedModel() {
199                    return _fileVersion.isEscapedModel();
200            }
201    
202            public boolean isExpired() {
203                    return _fileVersion.isExpired();
204            }
205    
206            public boolean isPending() {
207                    return _fileVersion.isPending();
208            }
209    
210            public void setCompanyId(long companyId) {
211                    _fileVersion.setCompanyId(companyId);
212            }
213    
214            public void setCreateDate(Date date) {
215                    _fileVersion.setCreateDate(date);
216            }
217    
218            public void setGroupId(long groupId) {
219                    _fileVersion.setGroupId(groupId);
220            }
221    
222            public void setModifiedDate(Date date) {
223                    _fileVersion.setModifiedDate(date);
224            }
225    
226            public void setPrimaryKeyObj(Serializable primaryKeyObj) {
227                    _fileVersion.setPrimaryKeyObj(primaryKeyObj);
228            }
229    
230            public void setUserId(long userId) {
231                    _fileVersion.setUserId(userId);
232            }
233    
234            public void setUserName(String userName) {
235                    _fileVersion.setUserName(userName);
236            }
237    
238            public void setUserUuid(String userUuid) {
239                    _fileVersion.setUserUuid(userUuid);
240            }
241    
242            public FileVersion toEscapedModel() {
243                    FileVersion fileVersion = _fileVersion.toEscapedModel();
244    
245                    return newFileVersionProxyBean(fileVersion);
246            }
247    
248            private FileVersion _fileVersion;
249    
250    }