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