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.dao.db.DB;
019    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.exception.SystemException;
023    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
024    import com.liferay.portal.model.Team;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.TeamService;
027    import com.liferay.portal.service.persistence.RoleFinder;
028    import com.liferay.portal.service.persistence.RolePersistence;
029    import com.liferay.portal.service.persistence.TeamFinder;
030    import com.liferay.portal.service.persistence.TeamPersistence;
031    import com.liferay.portal.service.persistence.UserFinder;
032    import com.liferay.portal.service.persistence.UserGroupFinder;
033    import com.liferay.portal.service.persistence.UserGroupPersistence;
034    import com.liferay.portal.service.persistence.UserPersistence;
035    import com.liferay.portal.util.PortalUtil;
036    
037    import javax.sql.DataSource;
038    
039    /**
040     * Provides the base implementation for the team remote service.
041     *
042     * <p>
043     * 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.TeamServiceImpl}.
044     * </p>
045     *
046     * @author Brian Wing Shun Chan
047     * @see com.liferay.portal.service.impl.TeamServiceImpl
048     * @see com.liferay.portal.service.TeamServiceUtil
049     * @generated
050     */
051    public abstract class TeamServiceBaseImpl extends BaseServiceImpl
052            implements TeamService, IdentifiableOSGiService {
053            /*
054             * NOTE FOR DEVELOPERS:
055             *
056             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.TeamServiceUtil} to access the team remote service.
057             */
058    
059            /**
060             * Returns the team local service.
061             *
062             * @return the team local service
063             */
064            public com.liferay.portal.service.TeamLocalService getTeamLocalService() {
065                    return teamLocalService;
066            }
067    
068            /**
069             * Sets the team local service.
070             *
071             * @param teamLocalService the team local service
072             */
073            public void setTeamLocalService(
074                    com.liferay.portal.service.TeamLocalService teamLocalService) {
075                    this.teamLocalService = teamLocalService;
076            }
077    
078            /**
079             * Returns the team remote service.
080             *
081             * @return the team remote service
082             */
083            public TeamService getTeamService() {
084                    return teamService;
085            }
086    
087            /**
088             * Sets the team remote service.
089             *
090             * @param teamService the team remote service
091             */
092            public void setTeamService(TeamService teamService) {
093                    this.teamService = teamService;
094            }
095    
096            /**
097             * Returns the team persistence.
098             *
099             * @return the team persistence
100             */
101            public TeamPersistence getTeamPersistence() {
102                    return teamPersistence;
103            }
104    
105            /**
106             * Sets the team persistence.
107             *
108             * @param teamPersistence the team persistence
109             */
110            public void setTeamPersistence(TeamPersistence teamPersistence) {
111                    this.teamPersistence = teamPersistence;
112            }
113    
114            /**
115             * Returns the team finder.
116             *
117             * @return the team finder
118             */
119            public TeamFinder getTeamFinder() {
120                    return teamFinder;
121            }
122    
123            /**
124             * Sets the team finder.
125             *
126             * @param teamFinder the team finder
127             */
128            public void setTeamFinder(TeamFinder teamFinder) {
129                    this.teamFinder = teamFinder;
130            }
131    
132            /**
133             * Returns the counter local service.
134             *
135             * @return the counter local service
136             */
137            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
138                    return counterLocalService;
139            }
140    
141            /**
142             * Sets the counter local service.
143             *
144             * @param counterLocalService the counter local service
145             */
146            public void setCounterLocalService(
147                    com.liferay.counter.service.CounterLocalService counterLocalService) {
148                    this.counterLocalService = counterLocalService;
149            }
150    
151            /**
152             * Returns the resource local service.
153             *
154             * @return the resource local service
155             */
156            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
157                    return resourceLocalService;
158            }
159    
160            /**
161             * Sets the resource local service.
162             *
163             * @param resourceLocalService the resource local service
164             */
165            public void setResourceLocalService(
166                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
167                    this.resourceLocalService = resourceLocalService;
168            }
169    
170            /**
171             * Returns the role local service.
172             *
173             * @return the role local service
174             */
175            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
176                    return roleLocalService;
177            }
178    
179            /**
180             * Sets the role local service.
181             *
182             * @param roleLocalService the role local service
183             */
184            public void setRoleLocalService(
185                    com.liferay.portal.service.RoleLocalService roleLocalService) {
186                    this.roleLocalService = roleLocalService;
187            }
188    
189            /**
190             * Returns the role remote service.
191             *
192             * @return the role remote service
193             */
194            public com.liferay.portal.service.RoleService getRoleService() {
195                    return roleService;
196            }
197    
198            /**
199             * Sets the role remote service.
200             *
201             * @param roleService the role remote service
202             */
203            public void setRoleService(
204                    com.liferay.portal.service.RoleService roleService) {
205                    this.roleService = roleService;
206            }
207    
208            /**
209             * Returns the role persistence.
210             *
211             * @return the role persistence
212             */
213            public RolePersistence getRolePersistence() {
214                    return rolePersistence;
215            }
216    
217            /**
218             * Sets the role persistence.
219             *
220             * @param rolePersistence the role persistence
221             */
222            public void setRolePersistence(RolePersistence rolePersistence) {
223                    this.rolePersistence = rolePersistence;
224            }
225    
226            /**
227             * Returns the role finder.
228             *
229             * @return the role finder
230             */
231            public RoleFinder getRoleFinder() {
232                    return roleFinder;
233            }
234    
235            /**
236             * Sets the role finder.
237             *
238             * @param roleFinder the role finder
239             */
240            public void setRoleFinder(RoleFinder roleFinder) {
241                    this.roleFinder = roleFinder;
242            }
243    
244            /**
245             * Returns the user local service.
246             *
247             * @return the user local service
248             */
249            public com.liferay.portal.service.UserLocalService getUserLocalService() {
250                    return userLocalService;
251            }
252    
253            /**
254             * Sets the user local service.
255             *
256             * @param userLocalService the user local service
257             */
258            public void setUserLocalService(
259                    com.liferay.portal.service.UserLocalService userLocalService) {
260                    this.userLocalService = userLocalService;
261            }
262    
263            /**
264             * Returns the user remote service.
265             *
266             * @return the user remote service
267             */
268            public com.liferay.portal.service.UserService getUserService() {
269                    return userService;
270            }
271    
272            /**
273             * Sets the user remote service.
274             *
275             * @param userService the user remote service
276             */
277            public void setUserService(
278                    com.liferay.portal.service.UserService userService) {
279                    this.userService = userService;
280            }
281    
282            /**
283             * Returns the user persistence.
284             *
285             * @return the user persistence
286             */
287            public UserPersistence getUserPersistence() {
288                    return userPersistence;
289            }
290    
291            /**
292             * Sets the user persistence.
293             *
294             * @param userPersistence the user persistence
295             */
296            public void setUserPersistence(UserPersistence userPersistence) {
297                    this.userPersistence = userPersistence;
298            }
299    
300            /**
301             * Returns the user finder.
302             *
303             * @return the user finder
304             */
305            public UserFinder getUserFinder() {
306                    return userFinder;
307            }
308    
309            /**
310             * Sets the user finder.
311             *
312             * @param userFinder the user finder
313             */
314            public void setUserFinder(UserFinder userFinder) {
315                    this.userFinder = userFinder;
316            }
317    
318            /**
319             * Returns the user group local service.
320             *
321             * @return the user group local service
322             */
323            public com.liferay.portal.service.UserGroupLocalService getUserGroupLocalService() {
324                    return userGroupLocalService;
325            }
326    
327            /**
328             * Sets the user group local service.
329             *
330             * @param userGroupLocalService the user group local service
331             */
332            public void setUserGroupLocalService(
333                    com.liferay.portal.service.UserGroupLocalService userGroupLocalService) {
334                    this.userGroupLocalService = userGroupLocalService;
335            }
336    
337            /**
338             * Returns the user group remote service.
339             *
340             * @return the user group remote service
341             */
342            public com.liferay.portal.service.UserGroupService getUserGroupService() {
343                    return userGroupService;
344            }
345    
346            /**
347             * Sets the user group remote service.
348             *
349             * @param userGroupService the user group remote service
350             */
351            public void setUserGroupService(
352                    com.liferay.portal.service.UserGroupService userGroupService) {
353                    this.userGroupService = userGroupService;
354            }
355    
356            /**
357             * Returns the user group persistence.
358             *
359             * @return the user group persistence
360             */
361            public UserGroupPersistence getUserGroupPersistence() {
362                    return userGroupPersistence;
363            }
364    
365            /**
366             * Sets the user group persistence.
367             *
368             * @param userGroupPersistence the user group persistence
369             */
370            public void setUserGroupPersistence(
371                    UserGroupPersistence userGroupPersistence) {
372                    this.userGroupPersistence = userGroupPersistence;
373            }
374    
375            /**
376             * Returns the user group finder.
377             *
378             * @return the user group finder
379             */
380            public UserGroupFinder getUserGroupFinder() {
381                    return userGroupFinder;
382            }
383    
384            /**
385             * Sets the user group finder.
386             *
387             * @param userGroupFinder the user group finder
388             */
389            public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
390                    this.userGroupFinder = userGroupFinder;
391            }
392    
393            public void afterPropertiesSet() {
394            }
395    
396            public void destroy() {
397            }
398    
399            /**
400             * Returns the OSGi service identifier.
401             *
402             * @return the OSGi service identifier
403             */
404            @Override
405            public String getOSGiServiceIdentifier() {
406                    return TeamService.class.getName();
407            }
408    
409            protected Class<?> getModelClass() {
410                    return Team.class;
411            }
412    
413            protected String getModelClassName() {
414                    return Team.class.getName();
415            }
416    
417            /**
418             * Performs a SQL query.
419             *
420             * @param sql the sql query
421             */
422            protected void runSQL(String sql) {
423                    try {
424                            DataSource dataSource = teamPersistence.getDataSource();
425    
426                            DB db = DBManagerUtil.getDB();
427    
428                            sql = db.buildSQL(sql);
429                            sql = PortalUtil.transformSQL(sql);
430    
431                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
432                                            sql, new int[0]);
433    
434                            sqlUpdate.update();
435                    }
436                    catch (Exception e) {
437                            throw new SystemException(e);
438                    }
439            }
440    
441            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
442            protected com.liferay.portal.service.TeamLocalService teamLocalService;
443            @BeanReference(type = com.liferay.portal.service.TeamService.class)
444            protected TeamService teamService;
445            @BeanReference(type = TeamPersistence.class)
446            protected TeamPersistence teamPersistence;
447            @BeanReference(type = TeamFinder.class)
448            protected TeamFinder teamFinder;
449            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
450            protected com.liferay.counter.service.CounterLocalService counterLocalService;
451            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
452            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
453            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
454            protected com.liferay.portal.service.RoleLocalService roleLocalService;
455            @BeanReference(type = com.liferay.portal.service.RoleService.class)
456            protected com.liferay.portal.service.RoleService roleService;
457            @BeanReference(type = RolePersistence.class)
458            protected RolePersistence rolePersistence;
459            @BeanReference(type = RoleFinder.class)
460            protected RoleFinder roleFinder;
461            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
462            protected com.liferay.portal.service.UserLocalService userLocalService;
463            @BeanReference(type = com.liferay.portal.service.UserService.class)
464            protected com.liferay.portal.service.UserService userService;
465            @BeanReference(type = UserPersistence.class)
466            protected UserPersistence userPersistence;
467            @BeanReference(type = UserFinder.class)
468            protected UserFinder userFinder;
469            @BeanReference(type = com.liferay.portal.service.UserGroupLocalService.class)
470            protected com.liferay.portal.service.UserGroupLocalService userGroupLocalService;
471            @BeanReference(type = com.liferay.portal.service.UserGroupService.class)
472            protected com.liferay.portal.service.UserGroupService userGroupService;
473            @BeanReference(type = UserGroupPersistence.class)
474            protected UserGroupPersistence userGroupPersistence;
475            @BeanReference(type = UserGroupFinder.class)
476            protected UserGroupFinder userGroupFinder;
477    }