001
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
030 public class ImageWrapper implements Image, ModelWrapper<Image> {
031 public ImageWrapper(Image image) {
032 _image = image;
033 }
034
035 public Class<?> getModelClass() {
036 return Image.class;
037 }
038
039 public String getModelClassName() {
040 return Image.class.getName();
041 }
042
043 public Map<String, Object> getModelAttributes() {
044 Map<String, Object> attributes = new HashMap<String, Object>();
045
046 attributes.put("imageId", getImageId());
047 attributes.put("modifiedDate", getModifiedDate());
048 attributes.put("type", getType());
049 attributes.put("height", getHeight());
050 attributes.put("width", getWidth());
051 attributes.put("size", getSize());
052
053 return attributes;
054 }
055
056 public void setModelAttributes(Map<String, Object> attributes) {
057 Long imageId = (Long)attributes.get("imageId");
058
059 if (imageId != null) {
060 setImageId(imageId);
061 }
062
063 Date modifiedDate = (Date)attributes.get("modifiedDate");
064
065 if (modifiedDate != null) {
066 setModifiedDate(modifiedDate);
067 }
068
069 String type = (String)attributes.get("type");
070
071 if (type != null) {
072 setType(type);
073 }
074
075 Integer height = (Integer)attributes.get("height");
076
077 if (height != null) {
078 setHeight(height);
079 }
080
081 Integer width = (Integer)attributes.get("width");
082
083 if (width != null) {
084 setWidth(width);
085 }
086
087 Integer size = (Integer)attributes.get("size");
088
089 if (size != null) {
090 setSize(size);
091 }
092 }
093
094
099 public long getPrimaryKey() {
100 return _image.getPrimaryKey();
101 }
102
103
108 public void setPrimaryKey(long primaryKey) {
109 _image.setPrimaryKey(primaryKey);
110 }
111
112
117 public long getImageId() {
118 return _image.getImageId();
119 }
120
121
126 public void setImageId(long imageId) {
127 _image.setImageId(imageId);
128 }
129
130
135 public java.util.Date getModifiedDate() {
136 return _image.getModifiedDate();
137 }
138
139
144 public void setModifiedDate(java.util.Date modifiedDate) {
145 _image.setModifiedDate(modifiedDate);
146 }
147
148
153 public java.lang.String getType() {
154 return _image.getType();
155 }
156
157
162 public void setType(java.lang.String type) {
163 _image.setType(type);
164 }
165
166
171 public int getHeight() {
172 return _image.getHeight();
173 }
174
175
180 public void setHeight(int height) {
181 _image.setHeight(height);
182 }
183
184
189 public int getWidth() {
190 return _image.getWidth();
191 }
192
193
198 public void setWidth(int width) {
199 _image.setWidth(width);
200 }
201
202
207 public int getSize() {
208 return _image.getSize();
209 }
210
211
216 public void setSize(int size) {
217 _image.setSize(size);
218 }
219
220 public boolean isNew() {
221 return _image.isNew();
222 }
223
224 public void setNew(boolean n) {
225 _image.setNew(n);
226 }
227
228 public boolean isCachedModel() {
229 return _image.isCachedModel();
230 }
231
232 public void setCachedModel(boolean cachedModel) {
233 _image.setCachedModel(cachedModel);
234 }
235
236 public boolean isEscapedModel() {
237 return _image.isEscapedModel();
238 }
239
240 public java.io.Serializable getPrimaryKeyObj() {
241 return _image.getPrimaryKeyObj();
242 }
243
244 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
245 _image.setPrimaryKeyObj(primaryKeyObj);
246 }
247
248 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
249 return _image.getExpandoBridge();
250 }
251
252 public void setExpandoBridgeAttributes(
253 com.liferay.portal.model.BaseModel<?> baseModel) {
254 _image.setExpandoBridgeAttributes(baseModel);
255 }
256
257 public void setExpandoBridgeAttributes(
258 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
259 _image.setExpandoBridgeAttributes(expandoBridge);
260 }
261
262 public void setExpandoBridgeAttributes(
263 com.liferay.portal.service.ServiceContext serviceContext) {
264 _image.setExpandoBridgeAttributes(serviceContext);
265 }
266
267 @Override
268 public java.lang.Object clone() {
269 return new ImageWrapper((Image)_image.clone());
270 }
271
272 public int compareTo(com.liferay.portal.model.Image image) {
273 return _image.compareTo(image);
274 }
275
276 @Override
277 public int hashCode() {
278 return _image.hashCode();
279 }
280
281 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Image> toCacheModel() {
282 return _image.toCacheModel();
283 }
284
285 public com.liferay.portal.model.Image toEscapedModel() {
286 return new ImageWrapper(_image.toEscapedModel());
287 }
288
289 public com.liferay.portal.model.Image toUnescapedModel() {
290 return new ImageWrapper(_image.toUnescapedModel());
291 }
292
293 @Override
294 public java.lang.String toString() {
295 return _image.toString();
296 }
297
298 public java.lang.String toXmlString() {
299 return _image.toXmlString();
300 }
301
302 public void persist()
303 throws com.liferay.portal.kernel.exception.SystemException {
304 _image.persist();
305 }
306
307 public byte[] getTextObj() {
308 return _image.getTextObj();
309 }
310
311 public void setTextObj(byte[] textObj) {
312 _image.setTextObj(textObj);
313 }
314
315
318 public Image getWrappedImage() {
319 return _image;
320 }
321
322 public Image getWrappedModel() {
323 return _image;
324 }
325
326 public void resetOriginalValues() {
327 _image.resetOriginalValues();
328 }
329
330 private Image _image;
331 }