001    /**
002     * Copyright (c) 2000-2013 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.trash.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.jdbc.SqlUpdate;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
021    import com.liferay.portal.kernel.exception.SystemException;
022    import com.liferay.portal.service.BaseServiceImpl;
023    import com.liferay.portal.service.persistence.GroupFinder;
024    import com.liferay.portal.service.persistence.GroupPersistence;
025    import com.liferay.portal.service.persistence.UserFinder;
026    import com.liferay.portal.service.persistence.UserPersistence;
027    
028    import com.liferay.portlet.trash.model.TrashEntry;
029    import com.liferay.portlet.trash.service.TrashEntryService;
030    import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
031    import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence;
032    
033    import javax.sql.DataSource;
034    
035    /**
036     * Provides the base implementation for the trash entry remote service.
037     *
038     * <p>
039     * 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.trash.service.impl.TrashEntryServiceImpl}.
040     * </p>
041     *
042     * @author Brian Wing Shun Chan
043     * @see com.liferay.portlet.trash.service.impl.TrashEntryServiceImpl
044     * @see com.liferay.portlet.trash.service.TrashEntryServiceUtil
045     * @generated
046     */
047    public abstract class TrashEntryServiceBaseImpl extends BaseServiceImpl
048            implements TrashEntryService, IdentifiableBean {
049            /*
050             * NOTE FOR DEVELOPERS:
051             *
052             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.trash.service.TrashEntryServiceUtil} to access the trash entry remote service.
053             */
054    
055            /**
056             * Returns the trash entry local service.
057             *
058             * @return the trash entry local service
059             */
060            public com.liferay.portlet.trash.service.TrashEntryLocalService getTrashEntryLocalService() {
061                    return trashEntryLocalService;
062            }
063    
064            /**
065             * Sets the trash entry local service.
066             *
067             * @param trashEntryLocalService the trash entry local service
068             */
069            public void setTrashEntryLocalService(
070                    com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService) {
071                    this.trashEntryLocalService = trashEntryLocalService;
072            }
073    
074            /**
075             * Returns the trash entry remote service.
076             *
077             * @return the trash entry remote service
078             */
079            public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() {
080                    return trashEntryService;
081            }
082    
083            /**
084             * Sets the trash entry remote service.
085             *
086             * @param trashEntryService the trash entry remote service
087             */
088            public void setTrashEntryService(
089                    com.liferay.portlet.trash.service.TrashEntryService trashEntryService) {
090                    this.trashEntryService = trashEntryService;
091            }
092    
093            /**
094             * Returns the trash entry persistence.
095             *
096             * @return the trash entry persistence
097             */
098            public TrashEntryPersistence getTrashEntryPersistence() {
099                    return trashEntryPersistence;
100            }
101    
102            /**
103             * Sets the trash entry persistence.
104             *
105             * @param trashEntryPersistence the trash entry persistence
106             */
107            public void setTrashEntryPersistence(
108                    TrashEntryPersistence trashEntryPersistence) {
109                    this.trashEntryPersistence = trashEntryPersistence;
110            }
111    
112            /**
113             * Returns the trash version local service.
114             *
115             * @return the trash version local service
116             */
117            public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() {
118                    return trashVersionLocalService;
119            }
120    
121            /**
122             * Sets the trash version local service.
123             *
124             * @param trashVersionLocalService the trash version local service
125             */
126            public void setTrashVersionLocalService(
127                    com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) {
128                    this.trashVersionLocalService = trashVersionLocalService;
129            }
130    
131            /**
132             * Returns the trash version persistence.
133             *
134             * @return the trash version persistence
135             */
136            public TrashVersionPersistence getTrashVersionPersistence() {
137                    return trashVersionPersistence;
138            }
139    
140            /**
141             * Sets the trash version persistence.
142             *
143             * @param trashVersionPersistence the trash version persistence
144             */
145            public void setTrashVersionPersistence(
146                    TrashVersionPersistence trashVersionPersistence) {
147                    this.trashVersionPersistence = trashVersionPersistence;
148            }
149    
150            /**
151             * Returns the counter local service.
152             *
153             * @return the counter local service
154             */
155            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
156                    return counterLocalService;
157            }
158    
159            /**
160             * Sets the counter local service.
161             *
162             * @param counterLocalService the counter local service
163             */
164            public void setCounterLocalService(
165                    com.liferay.counter.service.CounterLocalService counterLocalService) {
166                    this.counterLocalService = counterLocalService;
167            }
168    
169            /**
170             * Returns the group local service.
171             *
172             * @return the group local service
173             */
174            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
175                    return groupLocalService;
176            }
177    
178            /**
179             * Sets the group local service.
180             *
181             * @param groupLocalService the group local service
182             */
183            public void setGroupLocalService(
184                    com.liferay.portal.service.GroupLocalService groupLocalService) {
185                    this.groupLocalService = groupLocalService;
186            }
187    
188            /**
189             * Returns the group remote service.
190             *
191             * @return the group remote service
192             */
193            public com.liferay.portal.service.GroupService getGroupService() {
194                    return groupService;
195            }
196    
197            /**
198             * Sets the group remote service.
199             *
200             * @param groupService the group remote service
201             */
202            public void setGroupService(
203                    com.liferay.portal.service.GroupService groupService) {
204                    this.groupService = groupService;
205            }
206    
207            /**
208             * Returns the group persistence.
209             *
210             * @return the group persistence
211             */
212            public GroupPersistence getGroupPersistence() {
213                    return groupPersistence;
214            }
215    
216            /**
217             * Sets the group persistence.
218             *
219             * @param groupPersistence the group persistence
220             */
221            public void setGroupPersistence(GroupPersistence groupPersistence) {
222                    this.groupPersistence = groupPersistence;
223            }
224    
225            /**
226             * Returns the group finder.
227             *
228             * @return the group finder
229             */
230            public GroupFinder getGroupFinder() {
231                    return groupFinder;
232            }
233    
234            /**
235             * Sets the group finder.
236             *
237             * @param groupFinder the group finder
238             */
239            public void setGroupFinder(GroupFinder groupFinder) {
240                    this.groupFinder = groupFinder;
241            }
242    
243            /**
244             * Returns the resource local service.
245             *
246             * @return the resource local service
247             */
248            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
249                    return resourceLocalService;
250            }
251    
252            /**
253             * Sets the resource local service.
254             *
255             * @param resourceLocalService the resource local service
256             */
257            public void setResourceLocalService(
258                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
259                    this.resourceLocalService = resourceLocalService;
260            }
261    
262            /**
263             * Returns the user local service.
264             *
265             * @return the user local service
266             */
267            public com.liferay.portal.service.UserLocalService getUserLocalService() {
268                    return userLocalService;
269            }
270    
271            /**
272             * Sets the user local service.
273             *
274             * @param userLocalService the user local service
275             */
276            public void setUserLocalService(
277                    com.liferay.portal.service.UserLocalService userLocalService) {
278                    this.userLocalService = userLocalService;
279            }
280    
281            /**
282             * Returns the user remote service.
283             *
284             * @return the user remote service
285             */
286            public com.liferay.portal.service.UserService getUserService() {
287                    return userService;
288            }
289    
290            /**
291             * Sets the user remote service.
292             *
293             * @param userService the user remote service
294             */
295            public void setUserService(
296                    com.liferay.portal.service.UserService userService) {
297                    this.userService = userService;
298            }
299    
300            /**
301             * Returns the user persistence.
302             *
303             * @return the user persistence
304             */
305            public UserPersistence getUserPersistence() {
306                    return userPersistence;
307            }
308    
309            /**
310             * Sets the user persistence.
311             *
312             * @param userPersistence the user persistence
313             */
314            public void setUserPersistence(UserPersistence userPersistence) {
315                    this.userPersistence = userPersistence;
316            }
317    
318            /**
319             * Returns the user finder.
320             *
321             * @return the user finder
322             */
323            public UserFinder getUserFinder() {
324                    return userFinder;
325            }
326    
327            /**
328             * Sets the user finder.
329             *
330             * @param userFinder the user finder
331             */
332            public void setUserFinder(UserFinder userFinder) {
333                    this.userFinder = userFinder;
334            }
335    
336            public void afterPropertiesSet() {
337            }
338    
339            public void destroy() {
340            }
341    
342            /**
343             * Returns the Spring bean ID for this bean.
344             *
345             * @return the Spring bean ID for this bean
346             */
347            @Override
348            public String getBeanIdentifier() {
349                    return _beanIdentifier;
350            }
351    
352            /**
353             * Sets the Spring bean ID for this bean.
354             *
355             * @param beanIdentifier the Spring bean ID for this bean
356             */
357            @Override
358            public void setBeanIdentifier(String beanIdentifier) {
359                    _beanIdentifier = beanIdentifier;
360            }
361    
362            protected Class<?> getModelClass() {
363                    return TrashEntry.class;
364            }
365    
366            protected String getModelClassName() {
367                    return TrashEntry.class.getName();
368            }
369    
370            /**
371             * Performs an SQL query.
372             *
373             * @param sql the sql query
374             */
375            protected void runSQL(String sql) throws SystemException {
376                    try {
377                            DataSource dataSource = trashEntryPersistence.getDataSource();
378    
379                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
380                                            sql, new int[0]);
381    
382                            sqlUpdate.update();
383                    }
384                    catch (Exception e) {
385                            throw new SystemException(e);
386                    }
387            }
388    
389            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
390            protected com.liferay.portlet.trash.service.TrashEntryLocalService trashEntryLocalService;
391            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class)
392            protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService;
393            @BeanReference(type = TrashEntryPersistence.class)
394            protected TrashEntryPersistence trashEntryPersistence;
395            @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class)
396            protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService;
397            @BeanReference(type = TrashVersionPersistence.class)
398            protected TrashVersionPersistence trashVersionPersistence;
399            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
400            protected com.liferay.counter.service.CounterLocalService counterLocalService;
401            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
402            protected com.liferay.portal.service.GroupLocalService groupLocalService;
403            @BeanReference(type = com.liferay.portal.service.GroupService.class)
404            protected com.liferay.portal.service.GroupService groupService;
405            @BeanReference(type = GroupPersistence.class)
406            protected GroupPersistence groupPersistence;
407            @BeanReference(type = GroupFinder.class)
408            protected GroupFinder groupFinder;
409            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
410            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
411            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
412            protected com.liferay.portal.service.UserLocalService userLocalService;
413            @BeanReference(type = com.liferay.portal.service.UserService.class)
414            protected com.liferay.portal.service.UserService userService;
415            @BeanReference(type = UserPersistence.class)
416            protected UserPersistence userPersistence;
417            @BeanReference(type = UserFinder.class)
418            protected UserFinder userFinder;
419            private String _beanIdentifier;
420    }