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("name", getName());
056 attributes.put("url", getUrl());
057 attributes.put("openSource", getOpenSource());
058 attributes.put("active", getActive());
059 attributes.put("recommended", getRecommended());
060
061 return attributes;
062 }
063
064 @Override
065 public void setModelAttributes(Map<String, Object> attributes) {
066 Long licenseId = (Long)attributes.get("licenseId");
067
068 if (licenseId != null) {
069 setLicenseId(licenseId);
070 }
071
072 String name = (String)attributes.get("name");
073
074 if (name != null) {
075 setName(name);
076 }
077
078 String url = (String)attributes.get("url");
079
080 if (url != null) {
081 setUrl(url);
082 }
083
084 Boolean openSource = (Boolean)attributes.get("openSource");
085
086 if (openSource != null) {
087 setOpenSource(openSource);
088 }
089
090 Boolean active = (Boolean)attributes.get("active");
091
092 if (active != null) {
093 setActive(active);
094 }
095
096 Boolean recommended = (Boolean)attributes.get("recommended");
097
098 if (recommended != null) {
099 setRecommended(recommended);
100 }
101 }
102
103 @Override
104 public java.lang.Object clone() {
105 return new SCLicenseWrapper((SCLicense)_scLicense.clone());
106 }
107
108 @Override
109 public int compareTo(
110 com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
111 return _scLicense.compareTo(scLicense);
112 }
113
114
119 @Override
120 public boolean getActive() {
121 return _scLicense.getActive();
122 }
123
124 @Override
125 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
126 return _scLicense.getExpandoBridge();
127 }
128
129
134 @Override
135 public long getLicenseId() {
136 return _scLicense.getLicenseId();
137 }
138
139
144 @Override
145 public java.lang.String getName() {
146 return _scLicense.getName();
147 }
148
149
154 @Override
155 public boolean getOpenSource() {
156 return _scLicense.getOpenSource();
157 }
158
159
164 @Override
165 public long getPrimaryKey() {
166 return _scLicense.getPrimaryKey();
167 }
168
169 @Override
170 public java.io.Serializable getPrimaryKeyObj() {
171 return _scLicense.getPrimaryKeyObj();
172 }
173
174
179 @Override
180 public boolean getRecommended() {
181 return _scLicense.getRecommended();
182 }
183
184
189 @Override
190 public java.lang.String getUrl() {
191 return _scLicense.getUrl();
192 }
193
194 @Override
195 public int hashCode() {
196 return _scLicense.hashCode();
197 }
198
199
204 @Override
205 public boolean isActive() {
206 return _scLicense.isActive();
207 }
208
209 @Override
210 public boolean isCachedModel() {
211 return _scLicense.isCachedModel();
212 }
213
214 @Override
215 public boolean isEscapedModel() {
216 return _scLicense.isEscapedModel();
217 }
218
219 @Override
220 public boolean isNew() {
221 return _scLicense.isNew();
222 }
223
224
229 @Override
230 public boolean isOpenSource() {
231 return _scLicense.isOpenSource();
232 }
233
234
239 @Override
240 public boolean isRecommended() {
241 return _scLicense.isRecommended();
242 }
243
244 @Override
245 public void persist() {
246 _scLicense.persist();
247 }
248
249
254 @Override
255 public void setActive(boolean active) {
256 _scLicense.setActive(active);
257 }
258
259 @Override
260 public void setCachedModel(boolean cachedModel) {
261 _scLicense.setCachedModel(cachedModel);
262 }
263
264 @Override
265 public void setExpandoBridgeAttributes(
266 com.liferay.portal.model.BaseModel<?> baseModel) {
267 _scLicense.setExpandoBridgeAttributes(baseModel);
268 }
269
270 @Override
271 public void setExpandoBridgeAttributes(
272 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
273 _scLicense.setExpandoBridgeAttributes(expandoBridge);
274 }
275
276 @Override
277 public void setExpandoBridgeAttributes(
278 com.liferay.portal.service.ServiceContext serviceContext) {
279 _scLicense.setExpandoBridgeAttributes(serviceContext);
280 }
281
282
287 @Override
288 public void setLicenseId(long licenseId) {
289 _scLicense.setLicenseId(licenseId);
290 }
291
292
297 @Override
298 public void setName(java.lang.String name) {
299 _scLicense.setName(name);
300 }
301
302 @Override
303 public void setNew(boolean n) {
304 _scLicense.setNew(n);
305 }
306
307
312 @Override
313 public void setOpenSource(boolean openSource) {
314 _scLicense.setOpenSource(openSource);
315 }
316
317
322 @Override
323 public void setPrimaryKey(long primaryKey) {
324 _scLicense.setPrimaryKey(primaryKey);
325 }
326
327 @Override
328 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
329 _scLicense.setPrimaryKeyObj(primaryKeyObj);
330 }
331
332
337 @Override
338 public void setRecommended(boolean recommended) {
339 _scLicense.setRecommended(recommended);
340 }
341
342
347 @Override
348 public void setUrl(java.lang.String url) {
349 _scLicense.setUrl(url);
350 }
351
352 @Override
353 public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCLicense> toCacheModel() {
354 return _scLicense.toCacheModel();
355 }
356
357 @Override
358 public com.liferay.portlet.softwarecatalog.model.SCLicense toEscapedModel() {
359 return new SCLicenseWrapper(_scLicense.toEscapedModel());
360 }
361
362 @Override
363 public java.lang.String toString() {
364 return _scLicense.toString();
365 }
366
367 @Override
368 public com.liferay.portlet.softwarecatalog.model.SCLicense toUnescapedModel() {
369 return new SCLicenseWrapper(_scLicense.toUnescapedModel());
370 }
371
372 @Override
373 public java.lang.String toXmlString() {
374 return _scLicense.toXmlString();
375 }
376
377 @Override
378 public boolean equals(Object obj) {
379 if (this == obj) {
380 return true;
381 }
382
383 if (!(obj instanceof SCLicenseWrapper)) {
384 return false;
385 }
386
387 SCLicenseWrapper scLicenseWrapper = (SCLicenseWrapper)obj;
388
389 if (Validator.equals(_scLicense, scLicenseWrapper._scLicense)) {
390 return true;
391 }
392
393 return false;
394 }
395
396
399 @Deprecated
400 public SCLicense getWrappedSCLicense() {
401 return _scLicense;
402 }
403
404 @Override
405 public SCLicense getWrappedModel() {
406 return _scLicense;
407 }
408
409 @Override
410 public boolean isEntityCacheEnabled() {
411 return _scLicense.isEntityCacheEnabled();
412 }
413
414 @Override
415 public boolean isFinderCacheEnabled() {
416 return _scLicense.isFinderCacheEnabled();
417 }
418
419 @Override
420 public void resetOriginalValues() {
421 _scLicense.resetOriginalValues();
422 }
423
424 private final SCLicense _scLicense;
425 }