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.service.ServiceContext serviceContext) {
254 _image.setExpandoBridgeAttributes(serviceContext);
255 }
256
257 @Override
258 public java.lang.Object clone() {
259 return new ImageWrapper((Image)_image.clone());
260 }
261
262 public int compareTo(com.liferay.portal.model.Image image) {
263 return _image.compareTo(image);
264 }
265
266 @Override
267 public int hashCode() {
268 return _image.hashCode();
269 }
270
271 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.Image> toCacheModel() {
272 return _image.toCacheModel();
273 }
274
275 public com.liferay.portal.model.Image toEscapedModel() {
276 return new ImageWrapper(_image.toEscapedModel());
277 }
278
279 public com.liferay.portal.model.Image toUnescapedModel() {
280 return new ImageWrapper(_image.toUnescapedModel());
281 }
282
283 @Override
284 public java.lang.String toString() {
285 return _image.toString();
286 }
287
288 public java.lang.String toXmlString() {
289 return _image.toXmlString();
290 }
291
292 public void persist()
293 throws com.liferay.portal.kernel.exception.SystemException {
294 _image.persist();
295 }
296
297 public byte[] getTextObj() {
298 return _image.getTextObj();
299 }
300
301 public void setTextObj(byte[] textObj) {
302 _image.setTextObj(textObj);
303 }
304
305
308 public Image getWrappedImage() {
309 return _image;
310 }
311
312 public Image getWrappedModel() {
313 return _image;
314 }
315
316 public void resetOriginalValues() {
317 _image.resetOriginalValues();
318 }
319
320 private Image _image;
321 }