001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model;
016    
017    import com.liferay.portal.kernel.util.Validator;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * <p>
024     * This class is a wrapper for {@link ServiceComponent}.
025     * </p>
026     *
027     * @author    Brian Wing Shun Chan
028     * @see       ServiceComponent
029     * @generated
030     */
031    public class ServiceComponentWrapper implements ServiceComponent,
032            ModelWrapper<ServiceComponent> {
033            public ServiceComponentWrapper(ServiceComponent serviceComponent) {
034                    _serviceComponent = serviceComponent;
035            }
036    
037            public Class<?> getModelClass() {
038                    return ServiceComponent.class;
039            }
040    
041            public String getModelClassName() {
042                    return ServiceComponent.class.getName();
043            }
044    
045            public Map<String, Object> getModelAttributes() {
046                    Map<String, Object> attributes = new HashMap<String, Object>();
047    
048                    attributes.put("serviceComponentId", getServiceComponentId());
049                    attributes.put("buildNamespace", getBuildNamespace());
050                    attributes.put("buildNumber", getBuildNumber());
051                    attributes.put("buildDate", getBuildDate());
052                    attributes.put("data", getData());
053    
054                    return attributes;
055            }
056    
057            public void setModelAttributes(Map<String, Object> attributes) {
058                    Long serviceComponentId = (Long)attributes.get("serviceComponentId");
059    
060                    if (serviceComponentId != null) {
061                            setServiceComponentId(serviceComponentId);
062                    }
063    
064                    String buildNamespace = (String)attributes.get("buildNamespace");
065    
066                    if (buildNamespace != null) {
067                            setBuildNamespace(buildNamespace);
068                    }
069    
070                    Long buildNumber = (Long)attributes.get("buildNumber");
071    
072                    if (buildNumber != null) {
073                            setBuildNumber(buildNumber);
074                    }
075    
076                    Long buildDate = (Long)attributes.get("buildDate");
077    
078                    if (buildDate != null) {
079                            setBuildDate(buildDate);
080                    }
081    
082                    String data = (String)attributes.get("data");
083    
084                    if (data != null) {
085                            setData(data);
086                    }
087            }
088    
089            /**
090            * Returns the primary key of this service component.
091            *
092            * @return the primary key of this service component
093            */
094            public long getPrimaryKey() {
095                    return _serviceComponent.getPrimaryKey();
096            }
097    
098            /**
099            * Sets the primary key of this service component.
100            *
101            * @param primaryKey the primary key of this service component
102            */
103            public void setPrimaryKey(long primaryKey) {
104                    _serviceComponent.setPrimaryKey(primaryKey);
105            }
106    
107            /**
108            * Returns the service component ID of this service component.
109            *
110            * @return the service component ID of this service component
111            */
112            public long getServiceComponentId() {
113                    return _serviceComponent.getServiceComponentId();
114            }
115    
116            /**
117            * Sets the service component ID of this service component.
118            *
119            * @param serviceComponentId the service component ID of this service component
120            */
121            public void setServiceComponentId(long serviceComponentId) {
122                    _serviceComponent.setServiceComponentId(serviceComponentId);
123            }
124    
125            /**
126            * Returns the build namespace of this service component.
127            *
128            * @return the build namespace of this service component
129            */
130            public java.lang.String getBuildNamespace() {
131                    return _serviceComponent.getBuildNamespace();
132            }
133    
134            /**
135            * Sets the build namespace of this service component.
136            *
137            * @param buildNamespace the build namespace of this service component
138            */
139            public void setBuildNamespace(java.lang.String buildNamespace) {
140                    _serviceComponent.setBuildNamespace(buildNamespace);
141            }
142    
143            /**
144            * Returns the build number of this service component.
145            *
146            * @return the build number of this service component
147            */
148            public long getBuildNumber() {
149                    return _serviceComponent.getBuildNumber();
150            }
151    
152            /**
153            * Sets the build number of this service component.
154            *
155            * @param buildNumber the build number of this service component
156            */
157            public void setBuildNumber(long buildNumber) {
158                    _serviceComponent.setBuildNumber(buildNumber);
159            }
160    
161            /**
162            * Returns the build date of this service component.
163            *
164            * @return the build date of this service component
165            */
166            public long getBuildDate() {
167                    return _serviceComponent.getBuildDate();
168            }
169    
170            /**
171            * Sets the build date of this service component.
172            *
173            * @param buildDate the build date of this service component
174            */
175            public void setBuildDate(long buildDate) {
176                    _serviceComponent.setBuildDate(buildDate);
177            }
178    
179            /**
180            * Returns the data of this service component.
181            *
182            * @return the data of this service component
183            */
184            public java.lang.String getData() {
185                    return _serviceComponent.getData();
186            }
187    
188            /**
189            * Sets the data of this service component.
190            *
191            * @param data the data of this service component
192            */
193            public void setData(java.lang.String data) {
194                    _serviceComponent.setData(data);
195            }
196    
197            public boolean isNew() {
198                    return _serviceComponent.isNew();
199            }
200    
201            public void setNew(boolean n) {
202                    _serviceComponent.setNew(n);
203            }
204    
205            public boolean isCachedModel() {
206                    return _serviceComponent.isCachedModel();
207            }
208    
209            public void setCachedModel(boolean cachedModel) {
210                    _serviceComponent.setCachedModel(cachedModel);
211            }
212    
213            public boolean isEscapedModel() {
214                    return _serviceComponent.isEscapedModel();
215            }
216    
217            public java.io.Serializable getPrimaryKeyObj() {
218                    return _serviceComponent.getPrimaryKeyObj();
219            }
220    
221            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
222                    _serviceComponent.setPrimaryKeyObj(primaryKeyObj);
223            }
224    
225            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
226                    return _serviceComponent.getExpandoBridge();
227            }
228    
229            public void setExpandoBridgeAttributes(
230                    com.liferay.portal.service.ServiceContext serviceContext) {
231                    _serviceComponent.setExpandoBridgeAttributes(serviceContext);
232            }
233    
234            @Override
235            public java.lang.Object clone() {
236                    return new ServiceComponentWrapper((ServiceComponent)_serviceComponent.clone());
237            }
238    
239            public int compareTo(
240                    com.liferay.portal.model.ServiceComponent serviceComponent) {
241                    return _serviceComponent.compareTo(serviceComponent);
242            }
243    
244            @Override
245            public int hashCode() {
246                    return _serviceComponent.hashCode();
247            }
248    
249            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ServiceComponent> toCacheModel() {
250                    return _serviceComponent.toCacheModel();
251            }
252    
253            public com.liferay.portal.model.ServiceComponent toEscapedModel() {
254                    return new ServiceComponentWrapper(_serviceComponent.toEscapedModel());
255            }
256    
257            public com.liferay.portal.model.ServiceComponent toUnescapedModel() {
258                    return new ServiceComponentWrapper(_serviceComponent.toUnescapedModel());
259            }
260    
261            @Override
262            public java.lang.String toString() {
263                    return _serviceComponent.toString();
264            }
265    
266            public java.lang.String toXmlString() {
267                    return _serviceComponent.toXmlString();
268            }
269    
270            public void persist()
271                    throws com.liferay.portal.kernel.exception.SystemException {
272                    _serviceComponent.persist();
273            }
274    
275            public java.lang.String getIndexesSQL() {
276                    return _serviceComponent.getIndexesSQL();
277            }
278    
279            public java.lang.String getSequencesSQL() {
280                    return _serviceComponent.getSequencesSQL();
281            }
282    
283            public java.lang.String getTablesSQL() {
284                    return _serviceComponent.getTablesSQL();
285            }
286    
287            @Override
288            public boolean equals(Object obj) {
289                    if (this == obj) {
290                            return true;
291                    }
292    
293                    if (!(obj instanceof ServiceComponentWrapper)) {
294                            return false;
295                    }
296    
297                    ServiceComponentWrapper serviceComponentWrapper = (ServiceComponentWrapper)obj;
298    
299                    if (Validator.equals(_serviceComponent,
300                                            serviceComponentWrapper._serviceComponent)) {
301                            return true;
302                    }
303    
304                    return false;
305            }
306    
307            /**
308             * @deprecated Renamed to {@link #getWrappedModel}
309             */
310            public ServiceComponent getWrappedServiceComponent() {
311                    return _serviceComponent;
312            }
313    
314            public ServiceComponent getWrappedModel() {
315                    return _serviceComponent;
316            }
317    
318            public void resetOriginalValues() {
319                    _serviceComponent.resetOriginalValues();
320            }
321    
322            private ServiceComponent _serviceComponent;
323    }