001
014
015 package com.liferay.portlet.documentlibrary.model;
016
017 import java.io.Serializable;
018
019 import java.sql.Blob;
020
021 import java.util.ArrayList;
022 import java.util.List;
023
024
030 public class DLContentSoap implements Serializable {
031 public static DLContentSoap toSoapModel(DLContent model) {
032 DLContentSoap soapModel = new DLContentSoap();
033
034 soapModel.setContentId(model.getContentId());
035 soapModel.setGroupId(model.getGroupId());
036 soapModel.setCompanyId(model.getCompanyId());
037 soapModel.setRepositoryId(model.getRepositoryId());
038 soapModel.setPath(model.getPath());
039 soapModel.setVersion(model.getVersion());
040 soapModel.setData(model.getData());
041 soapModel.setSize(model.getSize());
042
043 return soapModel;
044 }
045
046 public static DLContentSoap[] toSoapModels(DLContent[] models) {
047 DLContentSoap[] soapModels = new DLContentSoap[models.length];
048
049 for (int i = 0; i < models.length; i++) {
050 soapModels[i] = toSoapModel(models[i]);
051 }
052
053 return soapModels;
054 }
055
056 public static DLContentSoap[][] toSoapModels(DLContent[][] models) {
057 DLContentSoap[][] soapModels = null;
058
059 if (models.length > 0) {
060 soapModels = new DLContentSoap[models.length][models[0].length];
061 }
062 else {
063 soapModels = new DLContentSoap[0][0];
064 }
065
066 for (int i = 0; i < models.length; i++) {
067 soapModels[i] = toSoapModels(models[i]);
068 }
069
070 return soapModels;
071 }
072
073 public static DLContentSoap[] toSoapModels(List<DLContent> models) {
074 List<DLContentSoap> soapModels = new ArrayList<DLContentSoap>(models.size());
075
076 for (DLContent model : models) {
077 soapModels.add(toSoapModel(model));
078 }
079
080 return soapModels.toArray(new DLContentSoap[soapModels.size()]);
081 }
082
083 public DLContentSoap() {
084 }
085
086 public long getPrimaryKey() {
087 return _contentId;
088 }
089
090 public void setPrimaryKey(long pk) {
091 setContentId(pk);
092 }
093
094 public long getContentId() {
095 return _contentId;
096 }
097
098 public void setContentId(long contentId) {
099 _contentId = contentId;
100 }
101
102 public long getGroupId() {
103 return _groupId;
104 }
105
106 public void setGroupId(long groupId) {
107 _groupId = groupId;
108 }
109
110 public long getCompanyId() {
111 return _companyId;
112 }
113
114 public void setCompanyId(long companyId) {
115 _companyId = companyId;
116 }
117
118 public long getRepositoryId() {
119 return _repositoryId;
120 }
121
122 public void setRepositoryId(long repositoryId) {
123 _repositoryId = repositoryId;
124 }
125
126 public String getPath() {
127 return _path;
128 }
129
130 public void setPath(String path) {
131 _path = path;
132 }
133
134 public String getVersion() {
135 return _version;
136 }
137
138 public void setVersion(String version) {
139 _version = version;
140 }
141
142 public Blob getData() {
143 return _data;
144 }
145
146 public void setData(Blob data) {
147 _data = data;
148 }
149
150 public long getSize() {
151 return _size;
152 }
153
154 public void setSize(long size) {
155 _size = size;
156 }
157
158 private long _contentId;
159 private long _groupId;
160 private long _companyId;
161 private long _repositoryId;
162 private String _path;
163 private String _version;
164 private Blob _data;
165 private long _size;
166 }