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.documentlibrary.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.exception.SystemException;
025    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
026    import com.liferay.portal.kernel.util.InfrastructureUtil;
027    import com.liferay.portal.service.BaseLocalServiceImpl;
028    import com.liferay.portal.util.PortalUtil;
029    
030    import com.liferay.portlet.documentlibrary.service.DLTrashLocalService;
031    
032    import javax.sql.DataSource;
033    
034    /**
035     * Provides the base implementation for the d l trash local 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.documentlibrary.service.impl.DLTrashLocalServiceImpl}.
039     * </p>
040     *
041     * @author Brian Wing Shun Chan
042     * @see com.liferay.portlet.documentlibrary.service.impl.DLTrashLocalServiceImpl
043     * @see com.liferay.portlet.documentlibrary.service.DLTrashLocalServiceUtil
044     * @generated
045     */
046    @ProviderType
047    public abstract class DLTrashLocalServiceBaseImpl extends BaseLocalServiceImpl
048            implements DLTrashLocalService, IdentifiableOSGiService {
049            /*
050             * NOTE FOR DEVELOPERS:
051             *
052             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.documentlibrary.service.DLTrashLocalServiceUtil} to access the d l trash local service.
053             */
054    
055            /**
056             * Returns the d l trash local service.
057             *
058             * @return the d l trash local service
059             */
060            public DLTrashLocalService getDLTrashLocalService() {
061                    return dlTrashLocalService;
062            }
063    
064            /**
065             * Sets the d l trash local service.
066             *
067             * @param dlTrashLocalService the d l trash local service
068             */
069            public void setDLTrashLocalService(DLTrashLocalService dlTrashLocalService) {
070                    this.dlTrashLocalService = dlTrashLocalService;
071            }
072    
073            /**
074             * Returns the counter local service.
075             *
076             * @return the counter local service
077             */
078            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
079                    return counterLocalService;
080            }
081    
082            /**
083             * Sets the counter local service.
084             *
085             * @param counterLocalService the counter local service
086             */
087            public void setCounterLocalService(
088                    com.liferay.counter.service.CounterLocalService counterLocalService) {
089                    this.counterLocalService = counterLocalService;
090            }
091    
092            /**
093             * Returns the d l app helper local service.
094             *
095             * @return the d l app helper local service
096             */
097            public com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService getDLAppHelperLocalService() {
098                    return dlAppHelperLocalService;
099            }
100    
101            /**
102             * Sets the d l app helper local service.
103             *
104             * @param dlAppHelperLocalService the d l app helper local service
105             */
106            public void setDLAppHelperLocalService(
107                    com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService) {
108                    this.dlAppHelperLocalService = dlAppHelperLocalService;
109            }
110    
111            public void afterPropertiesSet() {
112            }
113    
114            public void destroy() {
115            }
116    
117            /**
118             * Returns the OSGi service identifier.
119             *
120             * @return the OSGi service identifier
121             */
122            @Override
123            public String getOSGiServiceIdentifier() {
124                    return DLTrashLocalService.class.getName();
125            }
126    
127            /**
128             * Performs a SQL query.
129             *
130             * @param sql the sql query
131             */
132            protected void runSQL(String sql) {
133                    try {
134                            DataSource dataSource = InfrastructureUtil.getDataSource();
135    
136                            DB db = DBManagerUtil.getDB();
137    
138                            sql = db.buildSQL(sql);
139                            sql = PortalUtil.transformSQL(sql);
140    
141                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
142                                            sql, new int[0]);
143    
144                            sqlUpdate.update();
145                    }
146                    catch (Exception e) {
147                            throw new SystemException(e);
148                    }
149            }
150    
151            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLTrashLocalService.class)
152            protected DLTrashLocalService dlTrashLocalService;
153            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
154            protected com.liferay.counter.service.CounterLocalService counterLocalService;
155            @BeanReference(type = com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService.class)
156            protected com.liferay.portlet.documentlibrary.service.DLAppHelperLocalService dlAppHelperLocalService;
157    }