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