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
108 @Override
109 public long getPrimaryKey() {
110 return _scLicense.getPrimaryKey();
111 }
112
113
118 @Override
119 public void setPrimaryKey(long primaryKey) {
120 _scLicense.setPrimaryKey(primaryKey);
121 }
122
123
128 @Override
129 public long getLicenseId() {
130 return _scLicense.getLicenseId();
131 }
132
133
138 @Override
139 public void setLicenseId(long licenseId) {
140 _scLicense.setLicenseId(licenseId);
141 }
142
143
148 @Override
149 public java.lang.String getName() {
150 return _scLicense.getName();
151 }
152
153
158 @Override
159 public void setName(java.lang.String name) {
160 _scLicense.setName(name);
161 }
162
163
168 @Override
169 public java.lang.String getUrl() {
170 return _scLicense.getUrl();
171 }
172
173
178 @Override
179 public void setUrl(java.lang.String url) {
180 _scLicense.setUrl(url);
181 }
182
183
188 @Override
189 public boolean getOpenSource() {
190 return _scLicense.getOpenSource();
191 }
192
193
198 @Override
199 public boolean isOpenSource() {
200 return _scLicense.isOpenSource();
201 }
202
203
208 @Override
209 public void setOpenSource(boolean openSource) {
210 _scLicense.setOpenSource(openSource);
211 }
212
213
218 @Override
219 public boolean getActive() {
220 return _scLicense.getActive();
221 }
222
223
228 @Override
229 public boolean isActive() {
230 return _scLicense.isActive();
231 }
232
233
238 @Override
239 public void setActive(boolean active) {
240 _scLicense.setActive(active);
241 }
242
243
248 @Override
249 public boolean getRecommended() {
250 return _scLicense.getRecommended();
251 }
252
253
258 @Override
259 public boolean isRecommended() {
260 return _scLicense.isRecommended();
261 }
262
263
268 @Override
269 public void setRecommended(boolean recommended) {
270 _scLicense.setRecommended(recommended);
271 }
272
273 @Override
274 public boolean isNew() {
275 return _scLicense.isNew();
276 }
277
278 @Override
279 public void setNew(boolean n) {
280 _scLicense.setNew(n);
281 }
282
283 @Override
284 public boolean isCachedModel() {
285 return _scLicense.isCachedModel();
286 }
287
288 @Override
289 public void setCachedModel(boolean cachedModel) {
290 _scLicense.setCachedModel(cachedModel);
291 }
292
293 @Override
294 public boolean isEscapedModel() {
295 return _scLicense.isEscapedModel();
296 }
297
298 @Override
299 public java.io.Serializable getPrimaryKeyObj() {
300 return _scLicense.getPrimaryKeyObj();
301 }
302
303 @Override
304 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
305 _scLicense.setPrimaryKeyObj(primaryKeyObj);
306 }
307
308 @Override
309 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
310 return _scLicense.getExpandoBridge();
311 }
312
313 @Override
314 public void setExpandoBridgeAttributes(
315 com.liferay.portal.model.BaseModel<?> baseModel) {
316 _scLicense.setExpandoBridgeAttributes(baseModel);
317 }
318
319 @Override
320 public void setExpandoBridgeAttributes(
321 com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
322 _scLicense.setExpandoBridgeAttributes(expandoBridge);
323 }
324
325 @Override
326 public void setExpandoBridgeAttributes(
327 com.liferay.portal.service.ServiceContext serviceContext) {
328 _scLicense.setExpandoBridgeAttributes(serviceContext);
329 }
330
331 @Override
332 public java.lang.Object clone() {
333 return new SCLicenseWrapper((SCLicense)_scLicense.clone());
334 }
335
336 @Override
337 public int compareTo(
338 com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
339 return _scLicense.compareTo(scLicense);
340 }
341
342 @Override
343 public int hashCode() {
344 return _scLicense.hashCode();
345 }
346
347 @Override
348 public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCLicense> toCacheModel() {
349 return _scLicense.toCacheModel();
350 }
351
352 @Override
353 public com.liferay.portlet.softwarecatalog.model.SCLicense toEscapedModel() {
354 return new SCLicenseWrapper(_scLicense.toEscapedModel());
355 }
356
357 @Override
358 public com.liferay.portlet.softwarecatalog.model.SCLicense toUnescapedModel() {
359 return new SCLicenseWrapper(_scLicense.toUnescapedModel());
360 }
361
362 @Override
363 public java.lang.String toString() {
364 return _scLicense.toString();
365 }
366
367 @Override
368 public java.lang.String toXmlString() {
369 return _scLicense.toXmlString();
370 }
371
372 @Override
373 public void persist()
374 throws com.liferay.portal.kernel.exception.SystemException {
375 _scLicense.persist();
376 }
377
378 @Override
379 public boolean equals(Object obj) {
380 if (this == obj) {
381 return true;
382 }
383
384 if (!(obj instanceof SCLicenseWrapper)) {
385 return false;
386 }
387
388 SCLicenseWrapper scLicenseWrapper = (SCLicenseWrapper)obj;
389
390 if (Validator.equals(_scLicense, scLicenseWrapper._scLicense)) {
391 return true;
392 }
393
394 return false;
395 }
396
397
400 public SCLicense getWrappedSCLicense() {
401 return _scLicense;
402 }
403
404 @Override
405 public SCLicense getWrappedModel() {
406 return _scLicense;
407 }
408
409 @Override
410 public void resetOriginalValues() {
411 _scLicense.resetOriginalValues();
412 }
413
414 private SCLicense _scLicense;
415 }