001    /**
002     * Copyright (c) 2000-2012 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.service.ServiceContext serviceContext) {
229                    _serviceComponent.setExpandoBridgeAttributes(serviceContext);
230            }
231    
232            @Override
233            public java.lang.Object clone() {
234                    return new ServiceComponentWrapper((ServiceComponent)_serviceComponent.clone());
235            }
236    
237            public int compareTo(
238                    com.liferay.portal.model.ServiceComponent serviceComponent) {
239                    return _serviceComponent.compareTo(serviceComponent);
240            }
241    
242            @Override
243            public int hashCode() {
244                    return _serviceComponent.hashCode();
245            }
246    
247            public com.liferay.portal.model.CacheModel<com.liferay.portal.model.ServiceComponent> toCacheModel() {
248                    return _serviceComponent.toCacheModel();
249            }
250    
251            public com.liferay.portal.model.ServiceComponent toEscapedModel() {
252                    return new ServiceComponentWrapper(_serviceComponent.toEscapedModel());
253            }
254    
255            public com.liferay.portal.model.ServiceComponent toUnescapedModel() {
256                    return new ServiceComponentWrapper(_serviceComponent.toUnescapedModel());
257            }
258    
259            @Override
260            public java.lang.String toString() {
261                    return _serviceComponent.toString();
262            }
263    
264            public java.lang.String toXmlString() {
265                    return _serviceComponent.toXmlString();
266            }
267    
268            public void persist()
269                    throws com.liferay.portal.kernel.exception.SystemException {
270                    _serviceComponent.persist();
271            }
272    
273            public java.lang.String getIndexesSQL() {
274                    return _serviceComponent.getIndexesSQL();
275            }
276    
277            public java.lang.String getSequencesSQL() {
278                    return _serviceComponent.getSequencesSQL();
279            }
280    
281            public java.lang.String getTablesSQL() {
282                    return _serviceComponent.getTablesSQL();
283            }
284    
285            /**
286             * @deprecated Renamed to {@link #getWrappedModel}
287             */
288            public ServiceComponent getWrappedServiceComponent() {
289                    return _serviceComponent;
290            }
291    
292            public ServiceComponent getWrappedModel() {
293                    return _serviceComponent;
294            }
295    
296            public void resetOriginalValues() {
297                    _serviceComponent.resetOriginalValues();
298            }
299    
300            private ServiceComponent _serviceComponent;
301    }