001
014
015 package com.liferay.portlet.softwarecatalog.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018 import com.liferay.portal.model.ModelWrapper;
019
020 import java.util.HashMap;
021 import java.util.Map;
022
023
032 public class SCLicenseWrapper implements SCLicense, ModelWrapper<SCLicense> {
033 public SCLicenseWrapper(SCLicense scLicense) {
034 _scLicense = scLicense;
035 }
036
037 public Class<?> getModelClass() {
038 return SCLicense.class;
039 }
040
041 public String getModelClassName() {
042 return SCLicense.class.getName();
043 }
044
045 public Map<String, Object> getModelAttributes() {
046 Map<String, Object> attributes = new HashMap<String, Object>();
047
048 attributes.put("licenseId", getLicenseId());
049 attributes.put("name", getName());
050 attributes.put("url", getUrl());
051 attributes.put("openSource", getOpenSource());
052 attributes.put("active", getActive());
053 attributes.put("recommended", getRecommended());
054
055 return attributes;
056 }
057
058 public void setModelAttributes(Map<String, Object> attributes) {
059 Long licenseId = (Long)attributes.get("licenseId");
060
061 if (licenseId != null) {
062 setLicenseId(licenseId);
063 }
064
065 String name = (String)attributes.get("name");
066
067 if (name != null) {
068 setName(name);
069 }
070
071 String url = (String)attributes.get("url");
072
073 if (url != null) {
074 setUrl(url);
075 }
076
077 Boolean openSource = (Boolean)attributes.get("openSource");
078
079 if (openSource != null) {
080 setOpenSource(openSource);
081 }
082
083 Boolean active = (Boolean)attributes.get("active");
084
085 if (active != null) {
086 setActive(active);
087 }
088
089 Boolean recommended = (Boolean)attributes.get("recommended");
090
091 if (recommended != null) {
092 setRecommended(recommended);
093 }
094 }
095
096
101 public long getPrimaryKey() {
102 return _scLicense.getPrimaryKey();
103 }
104
105
110 public void setPrimaryKey(long primaryKey) {
111 _scLicense.setPrimaryKey(primaryKey);
112 }
113
114
119 public long getLicenseId() {
120 return _scLicense.getLicenseId();
121 }
122
123
128 public void setLicenseId(long licenseId) {
129 _scLicense.setLicenseId(licenseId);
130 }
131
132
137 public java.lang.String getName() {
138 return _scLicense.getName();
139 }
140
141
146 public void setName(java.lang.String name) {
147 _scLicense.setName(name);
148 }
149
150
155 public java.lang.String getUrl() {
156 return _scLicense.getUrl();
157 }
158
159
164 public void setUrl(java.lang.String url) {
165 _scLicense.setUrl(url);
166 }
167
168
173 public boolean getOpenSource() {
174 return _scLicense.getOpenSource();
175 }
176
177
182 public boolean isOpenSource() {
183 return _scLicense.isOpenSource();
184 }
185
186
191 public void setOpenSource(boolean openSource) {
192 _scLicense.setOpenSource(openSource);
193 }
194
195
200 public boolean getActive() {
201 return _scLicense.getActive();
202 }
203
204
209 public boolean isActive() {
210 return _scLicense.isActive();
211 }
212
213
218 public void setActive(boolean active) {
219 _scLicense.setActive(active);
220 }
221
222
227 public boolean getRecommended() {
228 return _scLicense.getRecommended();
229 }
230
231
236 public boolean isRecommended() {
237 return _scLicense.isRecommended();
238 }
239
240
245 public void setRecommended(boolean recommended) {
246 _scLicense.setRecommended(recommended);
247 }
248
249 public boolean isNew() {
250 return _scLicense.isNew();
251 }
252
253 public void setNew(boolean n) {
254 _scLicense.setNew(n);
255 }
256
257 public boolean isCachedModel() {
258 return _scLicense.isCachedModel();
259 }
260
261 public void setCachedModel(boolean cachedModel) {
262 _scLicense.setCachedModel(cachedModel);
263 }
264
265 public boolean isEscapedModel() {
266 return _scLicense.isEscapedModel();
267 }
268
269 public java.io.Serializable getPrimaryKeyObj() {
270 return _scLicense.getPrimaryKeyObj();
271 }
272
273 public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
274 _scLicense.setPrimaryKeyObj(primaryKeyObj);
275 }
276
277 public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
278 return _scLicense.getExpandoBridge();
279 }
280
281 public void setExpandoBridgeAttributes(
282 com.liferay.portal.service.ServiceContext serviceContext) {
283 _scLicense.setExpandoBridgeAttributes(serviceContext);
284 }
285
286 @Override
287 public java.lang.Object clone() {
288 return new SCLicenseWrapper((SCLicense)_scLicense.clone());
289 }
290
291 public int compareTo(
292 com.liferay.portlet.softwarecatalog.model.SCLicense scLicense) {
293 return _scLicense.compareTo(scLicense);
294 }
295
296 @Override
297 public int hashCode() {
298 return _scLicense.hashCode();
299 }
300
301 public com.liferay.portal.model.CacheModel<com.liferay.portlet.softwarecatalog.model.SCLicense> toCacheModel() {
302 return _scLicense.toCacheModel();
303 }
304
305 public com.liferay.portlet.softwarecatalog.model.SCLicense toEscapedModel() {
306 return new SCLicenseWrapper(_scLicense.toEscapedModel());
307 }
308
309 public com.liferay.portlet.softwarecatalog.model.SCLicense toUnescapedModel() {
310 return new SCLicenseWrapper(_scLicense.toUnescapedModel());
311 }
312
313 @Override
314 public java.lang.String toString() {
315 return _scLicense.toString();
316 }
317
318 public java.lang.String toXmlString() {
319 return _scLicense.toXmlString();
320 }
321
322 public void persist()
323 throws com.liferay.portal.kernel.exception.SystemException {
324 _scLicense.persist();
325 }
326
327 @Override
328 public boolean equals(Object obj) {
329 if (this == obj) {
330 return true;
331 }
332
333 if (!(obj instanceof SCLicenseWrapper)) {
334 return false;
335 }
336
337 SCLicenseWrapper scLicenseWrapper = (SCLicenseWrapper)obj;
338
339 if (Validator.equals(_scLicense, scLicenseWrapper._scLicense)) {
340 return true;
341 }
342
343 return false;
344 }
345
346
349 public SCLicense getWrappedSCLicense() {
350 return _scLicense;
351 }
352
353 public SCLicense getWrappedModel() {
354 return _scLicense;
355 }
356
357 public void resetOriginalValues() {
358 _scLicense.resetOriginalValues();
359 }
360
361 private SCLicense _scLicense;
362 }