001    /**
002     * Copyright (c) 2000-present 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.portlet.softwarecatalog.service.base;
016    
017    import com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.bean.IdentifiableBean;
019    import com.liferay.portal.kernel.dao.db.DB;
020    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.exception.SystemException;
024    import com.liferay.portal.service.BaseServiceImpl;
025    import com.liferay.portal.util.PortalUtil;
026    
027    import com.liferay.portlet.softwarecatalog.model.SCLicense;
028    import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
029    import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
030    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
031    
032    import javax.sql.DataSource;
033    
034    /**
035     * Provides the base implementation for the s c license remote service.
036     *
037     * <p>
038     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.softwarecatalog.service.impl.SCLicenseServiceImpl}.
039     * </p>
040     *
041     * @author Brian Wing Shun Chan
042     * @see com.liferay.portlet.softwarecatalog.service.impl.SCLicenseServiceImpl
043     * @see com.liferay.portlet.softwarecatalog.service.SCLicenseServiceUtil
044     * @generated
045     */
046    public abstract class SCLicenseServiceBaseImpl extends BaseServiceImpl
047            implements SCLicenseService, IdentifiableBean {
048            /*
049             * NOTE FOR DEVELOPERS:
050             *
051             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.softwarecatalog.service.SCLicenseServiceUtil} to access the s c license remote service.
052             */
053    
054            /**
055             * Returns the s c license local service.
056             *
057             * @return the s c license local service
058             */
059            public com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService getSCLicenseLocalService() {
060                    return scLicenseLocalService;
061            }
062    
063            /**
064             * Sets the s c license local service.
065             *
066             * @param scLicenseLocalService the s c license local service
067             */
068            public void setSCLicenseLocalService(
069                    com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService scLicenseLocalService) {
070                    this.scLicenseLocalService = scLicenseLocalService;
071            }
072    
073            /**
074             * Returns the s c license remote service.
075             *
076             * @return the s c license remote service
077             */
078            public SCLicenseService getSCLicenseService() {
079                    return scLicenseService;
080            }
081    
082            /**
083             * Sets the s c license remote service.
084             *
085             * @param scLicenseService the s c license remote service
086             */
087            public void setSCLicenseService(SCLicenseService scLicenseService) {
088                    this.scLicenseService = scLicenseService;
089            }
090    
091            /**
092             * Returns the s c license persistence.
093             *
094             * @return the s c license persistence
095             */
096            public SCLicensePersistence getSCLicensePersistence() {
097                    return scLicensePersistence;
098            }
099    
100            /**
101             * Sets the s c license persistence.
102             *
103             * @param scLicensePersistence the s c license persistence
104             */
105            public void setSCLicensePersistence(
106                    SCLicensePersistence scLicensePersistence) {
107                    this.scLicensePersistence = scLicensePersistence;
108            }
109    
110            /**
111             * Returns the counter local service.
112             *
113             * @return the counter local service
114             */
115            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
116                    return counterLocalService;
117            }
118    
119            /**
120             * Sets the counter local service.
121             *
122             * @param counterLocalService the counter local service
123             */
124            public void setCounterLocalService(
125                    com.liferay.counter.service.CounterLocalService counterLocalService) {
126                    this.counterLocalService = counterLocalService;
127            }
128    
129            /**
130             * Returns the s c product entry local service.
131             *
132             * @return the s c product entry local service
133             */
134            public com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService getSCProductEntryLocalService() {
135                    return scProductEntryLocalService;
136            }
137    
138            /**
139             * Sets the s c product entry local service.
140             *
141             * @param scProductEntryLocalService the s c product entry local service
142             */
143            public void setSCProductEntryLocalService(
144                    com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService scProductEntryLocalService) {
145                    this.scProductEntryLocalService = scProductEntryLocalService;
146            }
147    
148            /**
149             * Returns the s c product entry remote service.
150             *
151             * @return the s c product entry remote service
152             */
153            public com.liferay.portlet.softwarecatalog.service.SCProductEntryService getSCProductEntryService() {
154                    return scProductEntryService;
155            }
156    
157            /**
158             * Sets the s c product entry remote service.
159             *
160             * @param scProductEntryService the s c product entry remote service
161             */
162            public void setSCProductEntryService(
163                    com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService) {
164                    this.scProductEntryService = scProductEntryService;
165            }
166    
167            /**
168             * Returns the s c product entry persistence.
169             *
170             * @return the s c product entry persistence
171             */
172            public SCProductEntryPersistence getSCProductEntryPersistence() {
173                    return scProductEntryPersistence;
174            }
175    
176            /**
177             * Sets the s c product entry persistence.
178             *
179             * @param scProductEntryPersistence the s c product entry persistence
180             */
181            public void setSCProductEntryPersistence(
182                    SCProductEntryPersistence scProductEntryPersistence) {
183                    this.scProductEntryPersistence = scProductEntryPersistence;
184            }
185    
186            public void afterPropertiesSet() {
187            }
188    
189            public void destroy() {
190            }
191    
192            /**
193             * Returns the Spring bean ID for this bean.
194             *
195             * @return the Spring bean ID for this bean
196             */
197            @Override
198            public String getBeanIdentifier() {
199                    return _beanIdentifier;
200            }
201    
202            /**
203             * Sets the Spring bean ID for this bean.
204             *
205             * @param beanIdentifier the Spring bean ID for this bean
206             */
207            @Override
208            public void setBeanIdentifier(String beanIdentifier) {
209                    _beanIdentifier = beanIdentifier;
210            }
211    
212            protected Class<?> getModelClass() {
213                    return SCLicense.class;
214            }
215    
216            protected String getModelClassName() {
217                    return SCLicense.class.getName();
218            }
219    
220            /**
221             * Performs a SQL query.
222             *
223             * @param sql the sql query
224             */
225            protected void runSQL(String sql) {
226                    try {
227                            DataSource dataSource = scLicensePersistence.getDataSource();
228    
229                            DB db = DBFactoryUtil.getDB();
230    
231                            sql = db.buildSQL(sql);
232                            sql = PortalUtil.transformSQL(sql);
233    
234                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
235                                            sql, new int[0]);
236    
237                            sqlUpdate.update();
238                    }
239                    catch (Exception e) {
240                            throw new SystemException(e);
241                    }
242            }
243    
244            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.class)
245            protected com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService scLicenseLocalService;
246            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseService.class)
247            protected SCLicenseService scLicenseService;
248            @BeanReference(type = SCLicensePersistence.class)
249            protected SCLicensePersistence scLicensePersistence;
250            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
251            protected com.liferay.counter.service.CounterLocalService counterLocalService;
252            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.class)
253            protected com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService scProductEntryLocalService;
254            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryService.class)
255            protected com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService;
256            @BeanReference(type = SCProductEntryPersistence.class)
257            protected SCProductEntryPersistence scProductEntryPersistence;
258            private String _beanIdentifier;
259    }