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 com.liferay.portal.service.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(
087                    com.liferay.portal.service.OrgLaborService orgLaborService) {
088                    this.orgLaborService = orgLaborService;
089            }
090    
091            /**
092             * Returns the org labor persistence.
093             *
094             * @return the org labor persistence
095             */
096            public OrgLaborPersistence getOrgLaborPersistence() {
097                    return orgLaborPersistence;
098            }
099    
100            /**
101             * Sets the org labor persistence.
102             *
103             * @param orgLaborPersistence the org labor persistence
104             */
105            public void setOrgLaborPersistence(OrgLaborPersistence orgLaborPersistence) {
106                    this.orgLaborPersistence = orgLaborPersistence;
107            }
108    
109            /**
110             * Returns the counter local service.
111             *
112             * @return the counter local service
113             */
114            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
115                    return counterLocalService;
116            }
117    
118            /**
119             * Sets the counter local service.
120             *
121             * @param counterLocalService the counter local service
122             */
123            public void setCounterLocalService(
124                    com.liferay.counter.service.CounterLocalService counterLocalService) {
125                    this.counterLocalService = counterLocalService;
126            }
127    
128            /**
129             * Returns the list type remote service.
130             *
131             * @return the list type remote service
132             */
133            public com.liferay.portal.service.ListTypeService getListTypeService() {
134                    return listTypeService;
135            }
136    
137            /**
138             * Sets the list type remote service.
139             *
140             * @param listTypeService the list type remote service
141             */
142            public void setListTypeService(
143                    com.liferay.portal.service.ListTypeService listTypeService) {
144                    this.listTypeService = listTypeService;
145            }
146    
147            /**
148             * Returns the list type persistence.
149             *
150             * @return the list type persistence
151             */
152            public ListTypePersistence getListTypePersistence() {
153                    return listTypePersistence;
154            }
155    
156            /**
157             * Sets the list type persistence.
158             *
159             * @param listTypePersistence the list type persistence
160             */
161            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
162                    this.listTypePersistence = listTypePersistence;
163            }
164    
165            public void afterPropertiesSet() {
166            }
167    
168            public void destroy() {
169            }
170    
171            /**
172             * Returns the Spring bean ID for this bean.
173             *
174             * @return the Spring bean ID for this bean
175             */
176            @Override
177            public String getBeanIdentifier() {
178                    return _beanIdentifier;
179            }
180    
181            /**
182             * Sets the Spring bean ID for this bean.
183             *
184             * @param beanIdentifier the Spring bean ID for this bean
185             */
186            @Override
187            public void setBeanIdentifier(String beanIdentifier) {
188                    _beanIdentifier = beanIdentifier;
189            }
190    
191            protected Class<?> getModelClass() {
192                    return OrgLabor.class;
193            }
194    
195            protected String getModelClassName() {
196                    return OrgLabor.class.getName();
197            }
198    
199            /**
200             * Performs a SQL query.
201             *
202             * @param sql the sql query
203             */
204            protected void runSQL(String sql) {
205                    try {
206                            DataSource dataSource = orgLaborPersistence.getDataSource();
207    
208                            DB db = DBFactoryUtil.getDB();
209    
210                            sql = db.buildSQL(sql);
211                            sql = PortalUtil.transformSQL(sql);
212    
213                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
214                                            sql, new int[0]);
215    
216                            sqlUpdate.update();
217                    }
218                    catch (Exception e) {
219                            throw new SystemException(e);
220                    }
221            }
222    
223            @BeanReference(type = com.liferay.portal.service.OrgLaborLocalService.class)
224            protected com.liferay.portal.service.OrgLaborLocalService orgLaborLocalService;
225            @BeanReference(type = com.liferay.portal.service.OrgLaborService.class)
226            protected com.liferay.portal.service.OrgLaborService orgLaborService;
227            @BeanReference(type = OrgLaborPersistence.class)
228            protected OrgLaborPersistence orgLaborPersistence;
229            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
230            protected com.liferay.counter.service.CounterLocalService counterLocalService;
231            @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
232            protected com.liferay.portal.service.ListTypeService listTypeService;
233            @BeanReference(type = ListTypePersistence.class)
234            protected ListTypePersistence listTypePersistence;
235            private String _beanIdentifier;
236    }