001
014
015 package com.liferay.portal.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019 import java.util.HashMap;
020 import java.util.Map;
021
022
031 public class ServiceComponentWrapper implements ServiceComponent,
032 ModelWrapper<ServiceComponent> {
033 public ServiceComponentWrapper(ServiceComponent serviceComponent) {
034 _serviceComponent = serviceComponent;
035 }
036
037 public Class<?> getModelClass() {
038 return ServiceComponent.class;
039 }
040
041 public String getModelClassName() {
042 return ServiceComponent.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("serviceComponentId", getServiceComponentId());
049 attributes.put("buildNamespace", getBuildNamespace());
050 attributes.put("buildNumber", getBuildNumber());
051 attributes.put("buildDate", getBuildDate());
052 attributes.put("data", getData());
053
054 return attributes;
055 }
056
057 public void setModelAttributes(Map<String, Object> attributes) {
058 Long serviceComponentId = (Long)attributes.get("serviceComponentId");
059
060 if (serviceComponentId != null) {
061 setServiceComponentId(serviceComponentId);
062 }
063
064 String buildNamespace = (String)attributes.get("buildNamespace");
065
066 if (buildNamespace != null) {
067 setBuildNamespace(buildNamespace);
068 }
069
070 Long buildNumber = (Long)attributes.get("buildNumber");
071
072 if (buildNumber != null) {
073 setBuildNumber(buildNumber);
074 }
075
076 Long buildDate = (Long)attributes.get("buildDate");
077
078 if (buildDate != null) {
079 setBuildDate(buildDate);
080 }
081
082 String data = (String)attributes.get("data");
083
084 if (data != null) {
085 setData(data);
086 }
087 }
088
089
094 public long getPrimaryKey() {
095 return _serviceComponent.getPrimaryKey();
096 }
097
098
103 public void setPrimaryKey(long primaryKey) {
104 _serviceComponent.setPrimaryKey(primaryKey);
105 }
106
107
112 public long getServiceComponentId() {
113 return _serviceComponent.getServiceComponentId();
114 }
115
116
121 public void setServiceComponentId(long serviceComponentId) {
122 _serviceComponent.setServiceComponentId(serviceComponentId);
123 }
124
125
130 public java.lang.String getBuildNamespace() {
131 return _serviceComponent.getBuildNamespace();
132 }
133
134
139 public void setBuildNamespace(java.lang.String buildNamespace) {
140 _serviceComponent.setBuildNamespace(buildNamespace);
141 }
142
143
148 public long getBuildNumber() {
149 return _serviceComponent.getBuildNumber();
150 }
151
152
157 public void setBuildNumber(long buildNumber) {
158 _serviceComponent.setBuildNumber(buildNumber);
159 }
160
161
166 public long getBuildDate() {
167 return _serviceComponent.getBuildDate();
168 }
169
170
175 public void setBuildDate(long buildDate) {
176 _serviceComponent.setBuildDate(buildDate);
177 }
178
179
184 public java.lang.String getData() {
185 return _serviceComponent.getData();
186 }
187
188
193 public void setData(java.lang.String data) {
194 _serviceComponent.setData(data);
195 }
196
197 public boolean isNew() {
198 return _serviceComponent.isNew();
199 }
200
201 public void setNew(boolean n) {
202 _serviceComponent.setNew(n);
203 }
204
205 public boolean isCachedModel() {
206 return _serviceComponent.isCachedModel();
207 }
208
209 public void setCachedModel(boolean cachedModel) {
210 _serviceComponent.setCachedModel(cachedModel);
211 }
212
213 public boolean isEscapedModel() {
214 return _serviceComponent.isEscapedModel();
215 }
216
217 public java.io.Serializable getPrimaryKeyObj() {
218 return _serviceComponent.getPrimaryKeyObj();
219 }
220
221 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
222 _serviceComponent.setPrimaryKeyObj(primaryKeyObj);
223 }
224
225 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
226 return _serviceComponent.getExpandoBridge();
227 }
228
229 public void setExpandoBridgeAttributes(
230 com.liferay.portal.service.ServiceContext serviceContext) {
231 _serviceComponent.setExpandoBridgeAttributes(serviceContext);
232 }
233
234 @Override
235 public java.lang.Object clone() {
236 return new ServiceComponentWrapper((ServiceComponent)_serviceComponent.clone());
237 }
238
239 public int compareTo(
240 com.liferay.portal.model.ServiceComponent serviceComponent) {
241 return _serviceComponent.compareTo(serviceComponent);
242 }
243
244 @Override
245 public int hashCode() {
246 return _serviceComponent.hashCode();
247 }
248
249 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ServiceComponent> toCacheModel() {
250 return _serviceComponent.toCacheModel();
251 }
252
253 public com.liferay.portal.model.ServiceComponent toEscapedModel() {
254 return new ServiceComponentWrapper(_serviceComponent.toEscapedModel());
255 }
256
257 public com.liferay.portal.model.ServiceComponent toUnescapedModel() {
258 return new ServiceComponentWrapper(_serviceComponent.toUnescapedModel());
259 }
260
261 @Override
262 public java.lang.String toString() {
263 return _serviceComponent.toString();
264 }
265
266 public java.lang.String toXmlString() {
267 return _serviceComponent.toXmlString();
268 }
269
270 public void persist()
271 throws com.liferay.portal.kernel.exception.SystemException {
272 _serviceComponent.persist();
273 }
274
275 public java.lang.String getIndexesSQL() {
276 return _serviceComponent.getIndexesSQL();
277 }
278
279 public java.lang.String getSequencesSQL() {
280 return _serviceComponent.getSequencesSQL();
281 }
282
283 public java.lang.String getTablesSQL() {
284 return _serviceComponent.getTablesSQL();
285 }
286
287 @Override
288 public boolean equals(Object obj) {
289 if (this == obj) {
290 return true;
291 }
292
293 if (!(obj instanceof ServiceComponentWrapper)) {
294 return false;
295 }
296
297 ServiceComponentWrapper serviceComponentWrapper = (ServiceComponentWrapper)obj;
298
299 if (Validator.equals(_serviceComponent,
300 serviceComponentWrapper._serviceComponent)) {
301 return true;
302 }
303
304 return false;
305 }
306
307
310 public ServiceComponent getWrappedServiceComponent() {
311 return _serviceComponent;
312 }
313
314 public ServiceComponent getWrappedModel() {
315 return _serviceComponent;
316 }
317
318 public void resetOriginalValues() {
319 _serviceComponent.resetOriginalValues();
320 }
321
322 private ServiceComponent _serviceComponent;
323 }