001
014
015 package com.liferay.portal.model;
016
017 import java.io.Serializable;
018
019 import java.util.ArrayList;
020 import java.util.Date;
021 import java.util.List;
022
023
030 public class ImageSoap implements Serializable {
031 public static ImageSoap toSoapModel(Image model) {
032 ImageSoap soapModel = new ImageSoap();
033
034 soapModel.setImageId(model.getImageId());
035 soapModel.setModifiedDate(model.getModifiedDate());
036 soapModel.setText(model.getText());
037 soapModel.setType(model.getType());
038 soapModel.setHeight(model.getHeight());
039 soapModel.setWidth(model.getWidth());
040 soapModel.setSize(model.getSize());
041
042 return soapModel;
043 }
044
045 public static ImageSoap[] toSoapModels(Image[] models) {
046 ImageSoap[] soapModels = new ImageSoap[models.length];
047
048 for (int i = 0; i < models.length; i++) {
049 soapModels[i] = toSoapModel(models[i]);
050 }
051
052 return soapModels;
053 }
054
055 public static ImageSoap[][] toSoapModels(Image[][] models) {
056 ImageSoap[][] soapModels = null;
057
058 if (models.length > 0) {
059 soapModels = new ImageSoap[models.length][models[0].length];
060 }
061 else {
062 soapModels = new ImageSoap[0][0];
063 }
064
065 for (int i = 0; i < models.length; i++) {
066 soapModels[i] = toSoapModels(models[i]);
067 }
068
069 return soapModels;
070 }
071
072 public static ImageSoap[] toSoapModels(List<Image> models) {
073 List<ImageSoap> soapModels = new ArrayList<ImageSoap>(models.size());
074
075 for (Image model : models) {
076 soapModels.add(toSoapModel(model));
077 }
078
079 return soapModels.toArray(new ImageSoap[soapModels.size()]);
080 }
081
082 public ImageSoap() {
083 }
084
085 public long getPrimaryKey() {
086 return _imageId;
087 }
088
089 public void setPrimaryKey(long pk) {
090 setImageId(pk);
091 }
092
093 public long getImageId() {
094 return _imageId;
095 }
096
097 public void setImageId(long imageId) {
098 _imageId = imageId;
099 }
100
101 public Date getModifiedDate() {
102 return _modifiedDate;
103 }
104
105 public void setModifiedDate(Date modifiedDate) {
106 _modifiedDate = modifiedDate;
107 }
108
109 public String getText() {
110 return _text;
111 }
112
113 public void setText(String text) {
114 _text = text;
115 }
116
117 public String getType() {
118 return _type;
119 }
120
121 public void setType(String type) {
122 _type = type;
123 }
124
125 public int getHeight() {
126 return _height;
127 }
128
129 public void setHeight(int height) {
130 _height = height;
131 }
132
133 public int getWidth() {
134 return _width;
135 }
136
137 public void setWidth(int width) {
138 _width = width;
139 }
140
141 public int getSize() {
142 return _size;
143 }
144
145 public void setSize(int size) {
146 _size = size;
147 }
148
149 private long _imageId;
150 private Date _modifiedDate;
151 private String _text;
152 private String _type;
153 private int _height;
154 private int _width;
155 private int _size;
156 }