001
014
015 package com.liferay.portlet.softwarecatalog.model;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.util.Validator;
020 import com.liferay.portal.model.ModelWrapper;
021
022 import java.util.HashMap;
023 import java.util.Map;
024
025
034 @ProviderType
035 public class SCLicenseWrapper implements SCLicense, ModelWrapper<SCLicense> {
036 public SCLicenseWrapper(SCLicense scLicense) {
037 _scLicense = scLicense;
038 }
039
040 @Override
041 public Class<?> getModelClass() {
042 return SCLicense.class;
043 }
044
045 @Override
046 public String getModelClassName() {
047 return SCLicense.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("licenseId", getLicenseId());
055 attributes.put("companyId", getCompanyId());
056 attributes.put("name", getName());
057 attributes.put("url", getUrl());
058 attributes.put("openSource", getOpenSource());
059 attributes.put("active", getActive());
060 attributes.put("recommended", getRecommended());
061
062 return attributes;
063 }
064
065 @Override
066 public void setModelAttributes(Map<String, Object> attributes) {
067 Long licenseId = (Long)attributes.get("licenseId");
068
069 if (licenseId != null) {
070 setLicenseId(licenseId);
071 }
072
073 Long companyId = (Long)attributes.get("companyId");
074
075 if (companyId != null) {
076 setCompanyId(companyId);
077 }
078
079 String name = (String)attributes.get("name");
080
081 if (name != null) {
082 setName(name);
083 }
084
085 String url = (String)attributes.get("url");
086
087 if (url != null) {
088 setUrl(url);
089 }
090
091 Boolean openSource = (Boolean)attributes.get("openSource");
092
093 if (openSource != null) {
094 setOpenSource(openSource);
095 }
096
097 Boolean active = (Boolean)attributes.get("active");
098
099 if (active != null) {
100 setActive(active);
101 }
102
103 Boolean recommended = (Boolean)attributes.get("recommended");
104
105 if (recommended != null) {
106 setRecommended(recommended);
107 }
108 }
109
110 @Override
111 public java.lang.Object clone() {
112 return new SCLicenseWrapper((SCLicense)_scLicense.clone());
113 }
114
115 @Override
116 public int compareTo(
117 com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
118 return _scLicense.compareTo(scLicense);
119 }
120
121
126 @Override
127 public boolean getActive() {
128 return _scLicense.getActive();
129 }
130
131
136 @Override
137 public long getCompanyId() {
138 return _scLicense.getCompanyId();
139 }
140
141 @Override
142 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
143 return _scLicense.getExpandoBridge();
144 }
145
146
151 @Override
152 public long getLicenseId() {
153 return _scLicense.getLicenseId();
154 }
155
156
161 @Override
162 public java.lang.String getName() {
163 return _scLicense.getName();
164 }
165
166
171 @Override
172 public boolean getOpenSource() {
173 return _scLicense.getOpenSource();
174 }
175
176
181 @Override
182 public long getPrimaryKey() {
183 return _scLicense.getPrimaryKey();
184 }
185
186 @Override
187 public java.io.Serializable getPrimaryKeyObj() {
188 return _scLicense.getPrimaryKeyObj();
189 }
190
191
196 @Override
197 public boolean getRecommended() {
198 return _scLicense.getRecommended();
199 }
200
201
206 @Override
207 public java.lang.String getUrl() {
208 return _scLicense.getUrl();
209 }
210
211 @Override
212 public int hashCode() {
213 return _scLicense.hashCode();
214 }
215
216
221 @Override
222 public boolean isActive() {
223 return _scLicense.isActive();
224 }
225
226 @Override
227 public boolean isCachedModel() {
228 return _scLicense.isCachedModel();
229 }
230
231 @Override
232 public boolean isEscapedModel() {
233 return _scLicense.isEscapedModel();
234 }
235
236 @Override
237 public boolean isNew() {
238 return _scLicense.isNew();
239 }
240
241
246 @Override
247 public boolean isOpenSource() {
248 return _scLicense.isOpenSource();
249 }
250
251
256 @Override
257 public boolean isRecommended() {
258 return _scLicense.isRecommended();
259 }
260
261 @Override
262 public void persist() {
263 _scLicense.persist();
264 }
265
266
271 @Override
272 public void setActive(boolean active) {
273 _scLicense.setActive(active);
274 }
275
276 @Override
277 public void setCachedModel(boolean cachedModel) {
278 _scLicense.setCachedModel(cachedModel);
279 }
280
281
286 @Override
287 public void setCompanyId(long companyId) {
288 _scLicense.setCompanyId(companyId);
289 }
290
291 @Override
292 public void setExpandoBridgeAttributes(
293 com.liferay.portal.model.BaseModel<?> baseModel) {
294 _scLicense.setExpandoBridgeAttributes(baseModel);
295 }
296
297 @Override
298 public void setExpandoBridgeAttributes(
299 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
300 _scLicense.setExpandoBridgeAttributes(expandoBridge);
301 }
302
303 @Override
304 public void setExpandoBridgeAttributes(
305 com.liferay.portal.service.ServiceContext serviceContext) {
306 _scLicense.setExpandoBridgeAttributes(serviceContext);
307 }
308
309
314 @Override
315 public void setLicenseId(long licenseId) {
316 _scLicense.setLicenseId(licenseId);
317 }
318
319
324 @Override
325 public void setName(java.lang.String name) {
326 _scLicense.setName(name);
327 }
328
329 @Override
330 public void setNew(boolean n) {
331 _scLicense.setNew(n);
332 }
333
334
339 @Override
340 public void setOpenSource(boolean openSource) {
341 _scLicense.setOpenSource(openSource);
342 }
343
344
349 @Override
350 public void setPrimaryKey(long primaryKey) {
351 _scLicense.setPrimaryKey(primaryKey);
352 }
353
354 @Override
355 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
356 _scLicense.setPrimaryKeyObj(primaryKeyObj);
357 }
358
359
364 @Override
365 public void setRecommended(boolean recommended) {
366 _scLicense.setRecommended(recommended);
367 }
368
369
374 @Override
375 public void setUrl(java.lang.String url) {
376 _scLicense.setUrl(url);
377 }
378
379 @Override
380 public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCLicense> toCacheModel() {
381 return _scLicense.toCacheModel();
382 }
383
384 @Override
385 public com.liferay.portlet.softwarecatalog.model.SCLicense toEscapedModel() {
386 return new SCLicenseWrapper(_scLicense.toEscapedModel());
387 }
388
389 @Override
390 public java.lang.String toString() {
391 return _scLicense.toString();
392 }
393
394 @Override
395 public com.liferay.portlet.softwarecatalog.model.SCLicense toUnescapedModel() {
396 return new SCLicenseWrapper(_scLicense.toUnescapedModel());
397 }
398
399 @Override
400 public java.lang.String toXmlString() {
401 return _scLicense.toXmlString();
402 }
403
404 @Override
405 public boolean equals(Object obj) {
406 if (this == obj) {
407 return true;
408 }
409
410 if (!(obj instanceof SCLicenseWrapper)) {
411 return false;
412 }
413
414 SCLicenseWrapper scLicenseWrapper = (SCLicenseWrapper)obj;
415
416 if (Validator.equals(_scLicense, scLicenseWrapper._scLicense)) {
417 return true;
418 }
419
420 return false;
421 }
422
423
426 @Deprecated
427 public SCLicense getWrappedSCLicense() {
428 return _scLicense;
429 }
430
431 @Override
432 public SCLicense getWrappedModel() {
433 return _scLicense;
434 }
435
436 @Override
437 public boolean isEntityCacheEnabled() {
438 return _scLicense.isEntityCacheEnabled();
439 }
440
441 @Override
442 public boolean isFinderCacheEnabled() {
443 return _scLicense.isFinderCacheEnabled();
444 }
445
446 @Override
447 public void resetOriginalValues() {
448 _scLicense.resetOriginalValues();
449 }
450
451 private final SCLicense _scLicense;
452 }