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 com.liferay.portlet.softwarecatalog.service.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(
088                    com.liferay.portlet.softwarecatalog.service.SCLicenseService scLicenseService) {
089                    this.scLicenseService = scLicenseService;
090            }
091    
092            /**
093             * Returns the s c license persistence.
094             *
095             * @return the s c license persistence
096             */
097            public SCLicensePersistence getSCLicensePersistence() {
098                    return scLicensePersistence;
099            }
100    
101            /**
102             * Sets the s c license persistence.
103             *
104             * @param scLicensePersistence the s c license persistence
105             */
106            public void setSCLicensePersistence(
107                    SCLicensePersistence scLicensePersistence) {
108                    this.scLicensePersistence = scLicensePersistence;
109            }
110    
111            /**
112             * Returns the counter local service.
113             *
114             * @return the counter local service
115             */
116            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
117                    return counterLocalService;
118            }
119    
120            /**
121             * Sets the counter local service.
122             *
123             * @param counterLocalService the counter local service
124             */
125            public void setCounterLocalService(
126                    com.liferay.counter.service.CounterLocalService counterLocalService) {
127                    this.counterLocalService = counterLocalService;
128            }
129    
130            /**
131             * Returns the s c product entry local service.
132             *
133             * @return the s c product entry local service
134             */
135            public com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService getSCProductEntryLocalService() {
136                    return scProductEntryLocalService;
137            }
138    
139            /**
140             * Sets the s c product entry local service.
141             *
142             * @param scProductEntryLocalService the s c product entry local service
143             */
144            public void setSCProductEntryLocalService(
145                    com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService scProductEntryLocalService) {
146                    this.scProductEntryLocalService = scProductEntryLocalService;
147            }
148    
149            /**
150             * Returns the s c product entry remote service.
151             *
152             * @return the s c product entry remote service
153             */
154            public com.liferay.portlet.softwarecatalog.service.SCProductEntryService getSCProductEntryService() {
155                    return scProductEntryService;
156            }
157    
158            /**
159             * Sets the s c product entry remote service.
160             *
161             * @param scProductEntryService the s c product entry remote service
162             */
163            public void setSCProductEntryService(
164                    com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService) {
165                    this.scProductEntryService = scProductEntryService;
166            }
167    
168            /**
169             * Returns the s c product entry persistence.
170             *
171             * @return the s c product entry persistence
172             */
173            public SCProductEntryPersistence getSCProductEntryPersistence() {
174                    return scProductEntryPersistence;
175            }
176    
177            /**
178             * Sets the s c product entry persistence.
179             *
180             * @param scProductEntryPersistence the s c product entry persistence
181             */
182            public void setSCProductEntryPersistence(
183                    SCProductEntryPersistence scProductEntryPersistence) {
184                    this.scProductEntryPersistence = scProductEntryPersistence;
185            }
186    
187            public void afterPropertiesSet() {
188            }
189    
190            public void destroy() {
191            }
192    
193            /**
194             * Returns the Spring bean ID for this bean.
195             *
196             * @return the Spring bean ID for this bean
197             */
198            @Override
199            public String getBeanIdentifier() {
200                    return _beanIdentifier;
201            }
202    
203            /**
204             * Sets the Spring bean ID for this bean.
205             *
206             * @param beanIdentifier the Spring bean ID for this bean
207             */
208            @Override
209            public void setBeanIdentifier(String beanIdentifier) {
210                    _beanIdentifier = beanIdentifier;
211            }
212    
213            protected Class<?> getModelClass() {
214                    return SCLicense.class;
215            }
216    
217            protected String getModelClassName() {
218                    return SCLicense.class.getName();
219            }
220    
221            /**
222             * Performs a SQL query.
223             *
224             * @param sql the sql query
225             */
226            protected void runSQL(String sql) {
227                    try {
228                            DataSource dataSource = scLicensePersistence.getDataSource();
229    
230                            DB db = DBFactoryUtil.getDB();
231    
232                            sql = db.buildSQL(sql);
233                            sql = PortalUtil.transformSQL(sql);
234    
235                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
236                                            sql, new int[0]);
237    
238                            sqlUpdate.update();
239                    }
240                    catch (Exception e) {
241                            throw new SystemException(e);
242                    }
243            }
244    
245            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.class)
246            protected com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService scLicenseLocalService;
247            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseService.class)
248            protected com.liferay.portlet.softwarecatalog.service.SCLicenseService scLicenseService;
249            @BeanReference(type = SCLicensePersistence.class)
250            protected SCLicensePersistence scLicensePersistence;
251            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
252            protected com.liferay.counter.service.CounterLocalService counterLocalService;
253            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.class)
254            protected com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService scProductEntryLocalService;
255            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryService.class)
256            protected com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService;
257            @BeanReference(type = SCProductEntryPersistence.class)
258            protected SCProductEntryPersistence scProductEntryPersistence;
259            private String _beanIdentifier;
260    }