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("text", getText());
049 attributes.put("type", getType());
050 attributes.put("height", getHeight());
051 attributes.put("width", getWidth());
052 attributes.put("size", getSize());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long imageId = (Long)attributes.get("imageId");
059
060 if (imageId != null) {
061 setImageId(imageId);
062 }
063
064 Date modifiedDate = (Date)attributes.get("modifiedDate");
065
066 if (modifiedDate != null) {
067 setModifiedDate(modifiedDate);
068 }
069
070 String text = (String)attributes.get("text");
071
072 if (text != null) {
073 setText(text);
074 }
075
076 String type = (String)attributes.get("type");
077
078 if (type != null) {
079 setType(type);
080 }
081
082 Integer height = (Integer)attributes.get("height");
083
084 if (height != null) {
085 setHeight(height);
086 }
087
088 Integer width = (Integer)attributes.get("width");
089
090 if (width != null) {
091 setWidth(width);
092 }
093
094 Integer size = (Integer)attributes.get("size");
095
096 if (size != null) {
097 setSize(size);
098 }
099 }
100
101
106 public long getPrimaryKey() {
107 return _image.getPrimaryKey();
108 }
109
110
115 public void setPrimaryKey(long primaryKey) {
116 _image.setPrimaryKey(primaryKey);
117 }
118
119
124 public long getImageId() {
125 return _image.getImageId();
126 }
127
128
133 public void setImageId(long imageId) {
134 _image.setImageId(imageId);
135 }
136
137
142 public java.util.Date getModifiedDate() {
143 return _image.getModifiedDate();
144 }
145
146
151 public void setModifiedDate(java.util.Date modifiedDate) {
152 _image.setModifiedDate(modifiedDate);
153 }
154
155
160 public java.lang.String getText() {
161 return _image.getText();
162 }
163
164
169 public void setText(java.lang.String text) {
170 _image.setText(text);
171 }
172
173
178 public java.lang.String getType() {
179 return _image.getType();
180 }
181
182
187 public void setType(java.lang.String type) {
188 _image.setType(type);
189 }
190
191
196 public int getHeight() {
197 return _image.getHeight();
198 }
199
200
205 public void setHeight(int height) {
206 _image.setHeight(height);
207 }
208
209
214 public int getWidth() {
215 return _image.getWidth();
216 }
217
218
223 public void setWidth(int width) {
224 _image.setWidth(width);
225 }
226
227
232 public int getSize() {
233 return _image.getSize();
234 }
235
236
241 public void setSize(int size) {
242 _image.setSize(size);
243 }
244
245 public boolean isNew() {
246 return _image.isNew();
247 }
248
249 public void setNew(boolean n) {
250 _image.setNew(n);
251 }
252
253 public boolean isCachedModel() {
254 return _image.isCachedModel();
255 }
256
257 public void setCachedModel(boolean cachedModel) {
258 _image.setCachedModel(cachedModel);
259 }
260
261 public boolean isEscapedModel() {
262 return _image.isEscapedModel();
263 }
264
265 public java.io.Serializable getPrimaryKeyObj() {
266 return _image.getPrimaryKeyObj();
267 }
268
269 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
270 _image.setPrimaryKeyObj(primaryKeyObj);
271 }
272
273 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
274 return _image.getExpandoBridge();
275 }
276
277 public void setExpandoBridgeAttributes(
278 com.liferay.portal.service.ServiceContext serviceContext) {
279 _image.setExpandoBridgeAttributes(serviceContext);
280 }
281
282 @Override
283 public java.lang.Object clone() {
284 return new ImageWrapper((Image)_image.clone());
285 }
286
287 public int compareTo(com.liferay.portal.model.Image image) {
288 return _image.compareTo(image);
289 }
290
291 @Override
292 public int hashCode() {
293 return _image.hashCode();
294 }
295
296 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Image> toCacheModel() {
297 return _image.toCacheModel();
298 }
299
300 public com.liferay.portal.model.Image toEscapedModel() {
301 return new ImageWrapper(_image.toEscapedModel());
302 }
303
304 @Override
305 public java.lang.String toString() {
306 return _image.toString();
307 }
308
309 public java.lang.String toXmlString() {
310 return _image.toXmlString();
311 }
312
313 public void persist()
314 throws com.liferay.portal.kernel.exception.SystemException {
315 _image.persist();
316 }
317
318 public byte[] getTextObj() {
319 return _image.getTextObj();
320 }
321
322 public void setTextObj(byte[] textObj) {
323 _image.setTextObj(textObj);
324 }
325
326
329 public Image getWrappedImage() {
330 return _image;
331 }
332
333 public Image getWrappedModel() {
334 return _image;
335 }
336
337 public void resetOriginalValues() {
338 _image.resetOriginalValues();
339 }
340
341 private Image _image;
342 }