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 java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * <p>
022     * This class is a wrapper for {@link ServiceComponent}.
023     * </p>
024     *
025     * @author    Brian Wing Shun Chan
026     * @see       ServiceComponent
027     * @generated
028     */
029    public class ServiceComponentWrapper implements ServiceComponent,
030            ModelWrapper<ServiceComponent> {
031            public ServiceComponentWrapper(ServiceComponent serviceComponent) {
032                    _serviceComponent = serviceComponent;
033            }
034    
035            public Class<?> getModelClass() {
036                    return ServiceComponent.class;
037            }
038    
039            public String getModelClassName() {
040                    return ServiceComponent.class.getName();
041            }
042    
043            public Map<String, Object> getModelAttributes() {
044                    Map<String, Object> attributes = new HashMap<String, Object>();
045    
046                    attributes.put("serviceComponentId", getServiceComponentId());
047                    attributes.put("buildNamespace", getBuildNamespace());
048                    attributes.put("buildNumber", getBuildNumber());
049                    attributes.put("buildDate", getBuildDate());
050                    attributes.put("data", getData());
051    
052                    return attributes;
053            }
054    
055            public void setModelAttributes(Map<String, Object> attributes) {
056                    Long serviceComponentId = (Long)attributes.get("serviceComponentId");
057    
058                    if (serviceComponentId != null) {
059                            setServiceComponentId(serviceComponentId);
060                    }
061    
062                    String buildNamespace = (String)attributes.get("buildNamespace");
063    
064                    if (buildNamespace != null) {
065                            setBuildNamespace(buildNamespace);
066                    }
067    
068                    Long buildNumber = (Long)attributes.get("buildNumber");
069    
070                    if (buildNumber != null) {
071                            setBuildNumber(buildNumber);
072                    }
073    
074                    Long buildDate = (Long)attributes.get("buildDate");
075    
076                    if (buildDate != null) {
077                            setBuildDate(buildDate);
078                    }
079    
080                    String data = (String)attributes.get("data");
081    
082                    if (data != null) {
083                            setData(data);
084                    }
085            }
086    
087            /**
088            * Returns the primary key of this service component.
089            *
090            * @return the primary key of this service component
091            */
092            public long getPrimaryKey() {
093                    return _serviceComponent.getPrimaryKey();
094            }
095    
096            /**
097            * Sets the primary key of this service component.
098            *
099            * @param primaryKey the primary key of this service component
100            */
101            public void setPrimaryKey(long primaryKey) {
102                    _serviceComponent.setPrimaryKey(primaryKey);
103            }
104    
105            /**
106            * Returns the service component ID of this service component.
107            *
108            * @return the service component ID of this service component
109            */
110            public long getServiceComponentId() {
111                    return _serviceComponent.getServiceComponentId();
112            }
113    
114            /**
115            * Sets the service component ID of this service component.
116            *
117            * @param serviceComponentId the service component ID of this service component
118            */
119            public void setServiceComponentId(long serviceComponentId) {
120                    _serviceComponent.setServiceComponentId(serviceComponentId);
121            }
122    
123            /**
124            * Returns the build namespace of this service component.
125            *
126            * @return the build namespace of this service component
127            */
128            public java.lang.String getBuildNamespace() {
129                    return _serviceComponent.getBuildNamespace();
130            }
131    
132            /**
133            * Sets the build namespace of this service component.
134            *
135            * @param buildNamespace the build namespace of this service component
136            */
137            public void setBuildNamespace(java.lang.String buildNamespace) {
138                    _serviceComponent.setBuildNamespace(buildNamespace);
139            }
140    
141            /**
142            * Returns the build number of this service component.
143            *
144            * @return the build number of this service component
145            */
146            public long getBuildNumber() {
147                    return _serviceComponent.getBuildNumber();
148            }
149    
150            /**
151            * Sets the build number of this service component.
152            *
153            * @param buildNumber the build number of this service component
154            */
155            public void setBuildNumber(long buildNumber) {
156                    _serviceComponent.setBuildNumber(buildNumber);
157            }
158    
159            /**
160            * Returns the build date of this service component.
161            *
162            * @return the build date of this service component
163            */
164            public long getBuildDate() {
165                    return _serviceComponent.getBuildDate();
166            }
167    
168            /**
169            * Sets the build date of this service component.
170            *
171            * @param buildDate the build date of this service component
172            */
173            public void setBuildDate(long buildDate) {
174                    _serviceComponent.setBuildDate(buildDate);
175            }
176    
177            /**
178            * Returns the data of this service component.
179            *
180            * @return the data of this service component
181            */
182            public java.lang.String getData() {
183                    return _serviceComponent.getData();
184            }
185    
186            /**
187            * Sets the data of this service component.
188            *
189            * @param data the data of this service component
190            */
191            public void setData(java.lang.String data) {
192                    _serviceComponent.setData(data);
193            }
194    
195            public boolean isNew() {
196                    return _serviceComponent.isNew();
197            }
198    
199            public void setNew(boolean n) {
200                    _serviceComponent.setNew(n);
201            }
202    
203            public boolean isCachedModel() {
204                    return _serviceComponent.isCachedModel();
205            }
206    
207            public void setCachedModel(boolean cachedModel) {
208                    _serviceComponent.setCachedModel(cachedModel);
209            }
210    
211            public boolean isEscapedModel() {
212                    return _serviceComponent.isEscapedModel();
213            }
214    
215            public java.io.Serializable getPrimaryKeyObj() {
216                    return _serviceComponent.getPrimaryKeyObj();
217            }
218    
219            public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
220                    _serviceComponent.setPrimaryKeyObj(primaryKeyObj);
221            }
222    
223            public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
224                    return _serviceComponent.getExpandoBridge();
225            }
226    
227            public void setExpandoBridgeAttributes(
228                    com.liferay.portal.model.BaseModel<?> baseModel) {
229                    _serviceComponent.setExpandoBridgeAttributes(baseModel);
230            }
231    
232            public void setExpandoBridgeAttributes(
233                    com.liferay.portlet.expando.model.ExpandoBridge expandoBridge) {
234                    _serviceComponent.setExpandoBridgeAttributes(expandoBridge);
235            }
236    
237            public void setExpandoBridgeAttributes(
238                    com.liferay.portal.service.ServiceContext serviceContext) {
239                    _serviceComponent.setExpandoBridgeAttributes(serviceContext);
240            }
241    
242            @Override
243            public java.lang.Object clone() {
244                    return new ServiceComponentWrapper((ServiceComponent)_serviceComponent.clone());
245            }
246    
247            public int compareTo(
248                    com.liferay.portal.model.ServiceComponent serviceComponent) {
249                    return _serviceComponent.compareTo(serviceComponent);
250            }
251    
252            @Override
253            public int hashCode() {
254                    return _serviceComponent.hashCode();
255            }
256    
257            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ServiceComponent> toCacheModel() {
258                    return _serviceComponent.toCacheModel();
259            }
260    
261            public com.liferay.portal.model.ServiceComponent toEscapedModel() {
262                    return new ServiceComponentWrapper(_serviceComponent.toEscapedModel());
263            }
264    
265            public com.liferay.portal.model.ServiceComponent toUnescapedModel() {
266                    return new ServiceComponentWrapper(_serviceComponent.toUnescapedModel());
267            }
268    
269            @Override
270            public java.lang.String toString() {
271                    return _serviceComponent.toString();
272            }
273    
274            public java.lang.String toXmlString() {
275                    return _serviceComponent.toXmlString();
276            }
277    
278            public void persist()
279                    throws com.liferay.portal.kernel.exception.SystemException {
280                    _serviceComponent.persist();
281            }
282    
283            public java.lang.String getIndexesSQL() {
284                    return _serviceComponent.getIndexesSQL();
285            }
286    
287            public java.lang.String getSequencesSQL() {
288                    return _serviceComponent.getSequencesSQL();
289            }
290    
291            public java.lang.String getTablesSQL() {
292                    return _serviceComponent.getTablesSQL();
293            }
294    
295            /**
296             * @deprecated As of 6.1.0, replaced by {@link #getWrappedModel}
297             */
298            public ServiceComponent getWrappedServiceComponent() {
299                    return _serviceComponent;
300            }
301    
302            public ServiceComponent getWrappedModel() {
303                    return _serviceComponent;
304            }
305    
306            public void resetOriginalValues() {
307                    _serviceComponent.resetOriginalValues();
308            }
309    
310            private ServiceComponent _serviceComponent;
311    }