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.portal.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.model.OrgLabor;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.OrgLaborService;
027    import com.liferay.portal.service.persistence.ListTypePersistence;
028    import com.liferay.portal.service.persistence.OrgLaborPersistence;
029    import com.liferay.portal.util.PortalUtil;
030    
031    import javax.sql.DataSource;
032    
033    /**
034     * Provides the base implementation for the org labor remote service.
035     *
036     * <p>
037     * 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.portal.service.impl.OrgLaborServiceImpl}.
038     * </p>
039     *
040     * @author Brian Wing Shun Chan
041     * @see com.liferay.portal.service.impl.OrgLaborServiceImpl
042     * @see com.liferay.portal.service.OrgLaborServiceUtil
043     * @generated
044     */
045    public abstract class OrgLaborServiceBaseImpl extends BaseServiceImpl
046            implements OrgLaborService, IdentifiableBean {
047            /*
048             * NOTE FOR DEVELOPERS:
049             *
050             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.OrgLaborServiceUtil} to access the org labor remote service.
051             */
052    
053            /**
054             * Returns the org labor local service.
055             *
056             * @return the org labor local service
057             */
058            public com.liferay.portal.service.OrgLaborLocalService getOrgLaborLocalService() {
059                    return orgLaborLocalService;
060            }
061    
062            /**
063             * Sets the org labor local service.
064             *
065             * @param orgLaborLocalService the org labor local service
066             */
067            public void setOrgLaborLocalService(
068                    com.liferay.portal.service.OrgLaborLocalService orgLaborLocalService) {
069                    this.orgLaborLocalService = orgLaborLocalService;
070            }
071    
072            /**
073             * Returns the org labor remote service.
074             *
075             * @return the org labor remote service
076             */
077            public OrgLaborService getOrgLaborService() {
078                    return orgLaborService;
079            }
080    
081            /**
082             * Sets the org labor remote service.
083             *
084             * @param orgLaborService the org labor remote service
085             */
086            public void setOrgLaborService(OrgLaborService orgLaborService) {
087                    this.orgLaborService = orgLaborService;
088            }
089    
090            /**
091             * Returns the org labor persistence.
092             *
093             * @return the org labor persistence
094             */
095            public OrgLaborPersistence getOrgLaborPersistence() {
096                    return orgLaborPersistence;
097            }
098    
099            /**
100             * Sets the org labor persistence.
101             *
102             * @param orgLaborPersistence the org labor persistence
103             */
104            public void setOrgLaborPersistence(OrgLaborPersistence orgLaborPersistence) {
105                    this.orgLaborPersistence = orgLaborPersistence;
106            }
107    
108            /**
109             * Returns the counter local service.
110             *
111             * @return the counter local service
112             */
113            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
114                    return counterLocalService;
115            }
116    
117            /**
118             * Sets the counter local service.
119             *
120             * @param counterLocalService the counter local service
121             */
122            public void setCounterLocalService(
123                    com.liferay.counter.service.CounterLocalService counterLocalService) {
124                    this.counterLocalService = counterLocalService;
125            }
126    
127            /**
128             * Returns the list type local service.
129             *
130             * @return the list type local service
131             */
132            public com.liferay.portal.service.ListTypeLocalService getListTypeLocalService() {
133                    return listTypeLocalService;
134            }
135    
136            /**
137             * Sets the list type local service.
138             *
139             * @param listTypeLocalService the list type local service
140             */
141            public void setListTypeLocalService(
142                    com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
143                    this.listTypeLocalService = listTypeLocalService;
144            }
145    
146            /**
147             * Returns the list type remote service.
148             *
149             * @return the list type remote service
150             */
151            public com.liferay.portal.service.ListTypeService getListTypeService() {
152                    return listTypeService;
153            }
154    
155            /**
156             * Sets the list type remote service.
157             *
158             * @param listTypeService the list type remote service
159             */
160            public void setListTypeService(
161                    com.liferay.portal.service.ListTypeService listTypeService) {
162                    this.listTypeService = listTypeService;
163            }
164    
165            /**
166             * Returns the list type persistence.
167             *
168             * @return the list type persistence
169             */
170            public ListTypePersistence getListTypePersistence() {
171                    return listTypePersistence;
172            }
173    
174            /**
175             * Sets the list type persistence.
176             *
177             * @param listTypePersistence the list type persistence
178             */
179            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
180                    this.listTypePersistence = listTypePersistence;
181            }
182    
183            public void afterPropertiesSet() {
184            }
185    
186            public void destroy() {
187            }
188    
189            /**
190             * Returns the Spring bean ID for this bean.
191             *
192             * @return the Spring bean ID for this bean
193             */
194            @Override
195            public String getBeanIdentifier() {
196                    return _beanIdentifier;
197            }
198    
199            /**
200             * Sets the Spring bean ID for this bean.
201             *
202             * @param beanIdentifier the Spring bean ID for this bean
203             */
204            @Override
205            public void setBeanIdentifier(String beanIdentifier) {
206                    _beanIdentifier = beanIdentifier;
207            }
208    
209            protected Class<?> getModelClass() {
210                    return OrgLabor.class;
211            }
212    
213            protected String getModelClassName() {
214                    return OrgLabor.class.getName();
215            }
216    
217            /**
218             * Performs a SQL query.
219             *
220             * @param sql the sql query
221             */
222            protected void runSQL(String sql) {
223                    try {
224                            DataSource dataSource = orgLaborPersistence.getDataSource();
225    
226                            DB db = DBFactoryUtil.getDB();
227    
228                            sql = db.buildSQL(sql);
229                            sql = PortalUtil.transformSQL(sql);
230    
231                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
232                                            sql, new int[0]);
233    
234                            sqlUpdate.update();
235                    }
236                    catch (Exception e) {
237                            throw new SystemException(e);
238                    }
239            }
240    
241            @BeanReference(type = com.liferay.portal.service.OrgLaborLocalService.class)
242            protected com.liferay.portal.service.OrgLaborLocalService orgLaborLocalService;
243            @BeanReference(type = com.liferay.portal.service.OrgLaborService.class)
244            protected OrgLaborService orgLaborService;
245            @BeanReference(type = OrgLaborPersistence.class)
246            protected OrgLaborPersistence orgLaborPersistence;
247            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
248            protected com.liferay.counter.service.CounterLocalService counterLocalService;
249            @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
250            protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
251            @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
252            protected com.liferay.portal.service.ListTypeService listTypeService;
253            @BeanReference(type = ListTypePersistence.class)
254            protected ListTypePersistence listTypePersistence;
255            private String _beanIdentifier;
256    }