001
014
015 package com.liferay.portal.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020
021 import java.util.HashMap;
022 import java.util.Map;
023
024
033 @ProviderType
034 public class ServiceComponentWrapper implements ServiceComponent,
035 ModelWrapper<ServiceComponent> {
036 public ServiceComponentWrapper(ServiceComponent serviceComponent) {
037 _serviceComponent = serviceComponent;
038 }
039
040 @Override
041 public Class<?> getModelClass() {
042 return ServiceComponent.class;
043 }
044
045 @Override
046 public String getModelClassName() {
047 return ServiceComponent.class.getName();
048 }
049
050 @Override
051 public Map<String, Object> getModelAttributes() {
052 Map<String, Object> attributes = new HashMap<String, Object>();
053
054 attributes.put("serviceComponentId", getServiceComponentId());
055 attributes.put("buildNamespace", getBuildNamespace());
056 attributes.put("buildNumber", getBuildNumber());
057 attributes.put("buildDate", getBuildDate());
058 attributes.put("data", getData());
059
060 return attributes;
061 }
062
063 @Override
064 public void setModelAttributes(Map<String, Object> attributes) {
065 Long serviceComponentId = (Long)attributes.get("serviceComponentId");
066
067 if (serviceComponentId != null) {
068 setServiceComponentId(serviceComponentId);
069 }
070
071 String buildNamespace = (String)attributes.get("buildNamespace");
072
073 if (buildNamespace != null) {
074 setBuildNamespace(buildNamespace);
075 }
076
077 Long buildNumber = (Long)attributes.get("buildNumber");
078
079 if (buildNumber != null) {
080 setBuildNumber(buildNumber);
081 }
082
083 Long buildDate = (Long)attributes.get("buildDate");
084
085 if (buildDate != null) {
086 setBuildDate(buildDate);
087 }
088
089 String data = (String)attributes.get("data");
090
091 if (data != null) {
092 setData(data);
093 }
094 }
095
096
101 @Override
102 public long getPrimaryKey() {
103 return _serviceComponent.getPrimaryKey();
104 }
105
106
111 @Override
112 public void setPrimaryKey(long primaryKey) {
113 _serviceComponent.setPrimaryKey(primaryKey);
114 }
115
116
121 @Override
122 public long getServiceComponentId() {
123 return _serviceComponent.getServiceComponentId();
124 }
125
126
131 @Override
132 public void setServiceComponentId(long serviceComponentId) {
133 _serviceComponent.setServiceComponentId(serviceComponentId);
134 }
135
136
141 @Override
142 public java.lang.String getBuildNamespace() {
143 return _serviceComponent.getBuildNamespace();
144 }
145
146
151 @Override
152 public void setBuildNamespace(java.lang.String buildNamespace) {
153 _serviceComponent.setBuildNamespace(buildNamespace);
154 }
155
156
161 @Override
162 public long getBuildNumber() {
163 return _serviceComponent.getBuildNumber();
164 }
165
166
171 @Override
172 public void setBuildNumber(long buildNumber) {
173 _serviceComponent.setBuildNumber(buildNumber);
174 }
175
176
181 @Override
182 public long getBuildDate() {
183 return _serviceComponent.getBuildDate();
184 }
185
186
191 @Override
192 public void setBuildDate(long buildDate) {
193 _serviceComponent.setBuildDate(buildDate);
194 }
195
196
201 @Override
202 public java.lang.String getData() {
203 return _serviceComponent.getData();
204 }
205
206
211 @Override
212 public void setData(java.lang.String data) {
213 _serviceComponent.setData(data);
214 }
215
216 @Override
217 public boolean isNew() {
218 return _serviceComponent.isNew();
219 }
220
221 @Override
222 public void setNew(boolean n) {
223 _serviceComponent.setNew(n);
224 }
225
226 @Override
227 public boolean isCachedModel() {
228 return _serviceComponent.isCachedModel();
229 }
230
231 @Override
232 public void setCachedModel(boolean cachedModel) {
233 _serviceComponent.setCachedModel(cachedModel);
234 }
235
236 @Override
237 public boolean isEscapedModel() {
238 return _serviceComponent.isEscapedModel();
239 }
240
241 @Override
242 public java.io.Serializable getPrimaryKeyObj() {
243 return _serviceComponent.getPrimaryKeyObj();
244 }
245
246 @Override
247 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
248 _serviceComponent.setPrimaryKeyObj(primaryKeyObj);
249 }
250
251 @Override
252 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
253 return _serviceComponent.getExpandoBridge();
254 }
255
256 @Override
257 public void setExpandoBridgeAttributes(
258 com.liferay.portal.model.BaseModel<?> baseModel) {
259 _serviceComponent.setExpandoBridgeAttributes(baseModel);
260 }
261
262 @Override
263 public void setExpandoBridgeAttributes(
264 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
265 _serviceComponent.setExpandoBridgeAttributes(expandoBridge);
266 }
267
268 @Override
269 public void setExpandoBridgeAttributes(
270 com.liferay.portal.service.ServiceContext serviceContext) {
271 _serviceComponent.setExpandoBridgeAttributes(serviceContext);
272 }
273
274 @Override
275 public java.lang.Object clone() {
276 return new ServiceComponentWrapper((ServiceComponent)_serviceComponent.clone());
277 }
278
279 @Override
280 public int compareTo(
281 com.liferay.portal.model.ServiceComponent serviceComponent) {
282 return _serviceComponent.compareTo(serviceComponent);
283 }
284
285 @Override
286 public int hashCode() {
287 return _serviceComponent.hashCode();
288 }
289
290 @Override
291 public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ServiceComponent> toCacheModel() {
292 return _serviceComponent.toCacheModel();
293 }
294
295 @Override
296 public com.liferay.portal.model.ServiceComponent toEscapedModel() {
297 return new ServiceComponentWrapper(_serviceComponent.toEscapedModel());
298 }
299
300 @Override
301 public com.liferay.portal.model.ServiceComponent toUnescapedModel() {
302 return new ServiceComponentWrapper(_serviceComponent.toUnescapedModel());
303 }
304
305 @Override
306 public java.lang.String toString() {
307 return _serviceComponent.toString();
308 }
309
310 @Override
311 public java.lang.String toXmlString() {
312 return _serviceComponent.toXmlString();
313 }
314
315 @Override
316 public void persist()
317 throws com.liferay.portal.kernel.exception.SystemException {
318 _serviceComponent.persist();
319 }
320
321 @Override
322 public java.lang.String getIndexesSQL() {
323 return _serviceComponent.getIndexesSQL();
324 }
325
326 @Override
327 public java.lang.String getSequencesSQL() {
328 return _serviceComponent.getSequencesSQL();
329 }
330
331 @Override
332 public java.lang.String getTablesSQL() {
333 return _serviceComponent.getTablesSQL();
334 }
335
336 @Override
337 public boolean equals(Object obj) {
338 if (this == obj) {
339 return true;
340 }
341
342 if (!(obj instanceof ServiceComponentWrapper)) {
343 return false;
344 }
345
346 ServiceComponentWrapper serviceComponentWrapper = (ServiceComponentWrapper)obj;
347
348 if (Validator.equals(_serviceComponent,
349 serviceComponentWrapper._serviceComponent)) {
350 return true;
351 }
352
353 return false;
354 }
355
356
359 public ServiceComponent getWrappedServiceComponent() {
360 return _serviceComponent;
361 }
362
363 @Override
364 public ServiceComponent getWrappedModel() {
365 return _serviceComponent;
366 }
367
368 @Override
369 public void resetOriginalValues() {
370 _serviceComponent.resetOriginalValues();
371 }
372
373 private ServiceComponent _serviceComponent;
374 }