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.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, IdentifiableBean {
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 com.liferay.portal.service.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(
093                    com.liferay.portal.service.TeamService teamService) {
094                    this.teamService = teamService;
095            }
096    
097            /**
098             * Returns the team persistence.
099             *
100             * @return the team persistence
101             */
102            public TeamPersistence getTeamPersistence() {
103                    return teamPersistence;
104            }
105    
106            /**
107             * Sets the team persistence.
108             *
109             * @param teamPersistence the team persistence
110             */
111            public void setTeamPersistence(TeamPersistence teamPersistence) {
112                    this.teamPersistence = teamPersistence;
113            }
114    
115            /**
116             * Returns the team finder.
117             *
118             * @return the team finder
119             */
120            public TeamFinder getTeamFinder() {
121                    return teamFinder;
122            }
123    
124            /**
125             * Sets the team finder.
126             *
127             * @param teamFinder the team finder
128             */
129            public void setTeamFinder(TeamFinder teamFinder) {
130                    this.teamFinder = teamFinder;
131            }
132    
133            /**
134             * Returns the counter local service.
135             *
136             * @return the counter local service
137             */
138            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
139                    return counterLocalService;
140            }
141    
142            /**
143             * Sets the counter local service.
144             *
145             * @param counterLocalService the counter local service
146             */
147            public void setCounterLocalService(
148                    com.liferay.counter.service.CounterLocalService counterLocalService) {
149                    this.counterLocalService = counterLocalService;
150            }
151    
152            /**
153             * Returns the resource local service.
154             *
155             * @return the resource local service
156             */
157            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
158                    return resourceLocalService;
159            }
160    
161            /**
162             * Sets the resource local service.
163             *
164             * @param resourceLocalService the resource local service
165             */
166            public void setResourceLocalService(
167                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
168                    this.resourceLocalService = resourceLocalService;
169            }
170    
171            /**
172             * Returns the role local service.
173             *
174             * @return the role local service
175             */
176            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
177                    return roleLocalService;
178            }
179    
180            /**
181             * Sets the role local service.
182             *
183             * @param roleLocalService the role local service
184             */
185            public void setRoleLocalService(
186                    com.liferay.portal.service.RoleLocalService roleLocalService) {
187                    this.roleLocalService = roleLocalService;
188            }
189    
190            /**
191             * Returns the role remote service.
192             *
193             * @return the role remote service
194             */
195            public com.liferay.portal.service.RoleService getRoleService() {
196                    return roleService;
197            }
198    
199            /**
200             * Sets the role remote service.
201             *
202             * @param roleService the role remote service
203             */
204            public void setRoleService(
205                    com.liferay.portal.service.RoleService roleService) {
206                    this.roleService = roleService;
207            }
208    
209            /**
210             * Returns the role persistence.
211             *
212             * @return the role persistence
213             */
214            public RolePersistence getRolePersistence() {
215                    return rolePersistence;
216            }
217    
218            /**
219             * Sets the role persistence.
220             *
221             * @param rolePersistence the role persistence
222             */
223            public void setRolePersistence(RolePersistence rolePersistence) {
224                    this.rolePersistence = rolePersistence;
225            }
226    
227            /**
228             * Returns the role finder.
229             *
230             * @return the role finder
231             */
232            public RoleFinder getRoleFinder() {
233                    return roleFinder;
234            }
235    
236            /**
237             * Sets the role finder.
238             *
239             * @param roleFinder the role finder
240             */
241            public void setRoleFinder(RoleFinder roleFinder) {
242                    this.roleFinder = roleFinder;
243            }
244    
245            /**
246             * Returns the user local service.
247             *
248             * @return the user local service
249             */
250            public com.liferay.portal.service.UserLocalService getUserLocalService() {
251                    return userLocalService;
252            }
253    
254            /**
255             * Sets the user local service.
256             *
257             * @param userLocalService the user local service
258             */
259            public void setUserLocalService(
260                    com.liferay.portal.service.UserLocalService userLocalService) {
261                    this.userLocalService = userLocalService;
262            }
263    
264            /**
265             * Returns the user remote service.
266             *
267             * @return the user remote service
268             */
269            public com.liferay.portal.service.UserService getUserService() {
270                    return userService;
271            }
272    
273            /**
274             * Sets the user remote service.
275             *
276             * @param userService the user remote service
277             */
278            public void setUserService(
279                    com.liferay.portal.service.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            /**
320             * Returns the user group local service.
321             *
322             * @return the user group local service
323             */
324            public com.liferay.portal.service.UserGroupLocalService getUserGroupLocalService() {
325                    return userGroupLocalService;
326            }
327    
328            /**
329             * Sets the user group local service.
330             *
331             * @param userGroupLocalService the user group local service
332             */
333            public void setUserGroupLocalService(
334                    com.liferay.portal.service.UserGroupLocalService userGroupLocalService) {
335                    this.userGroupLocalService = userGroupLocalService;
336            }
337    
338            /**
339             * Returns the user group remote service.
340             *
341             * @return the user group remote service
342             */
343            public com.liferay.portal.service.UserGroupService getUserGroupService() {
344                    return userGroupService;
345            }
346    
347            /**
348             * Sets the user group remote service.
349             *
350             * @param userGroupService the user group remote service
351             */
352            public void setUserGroupService(
353                    com.liferay.portal.service.UserGroupService userGroupService) {
354                    this.userGroupService = userGroupService;
355            }
356    
357            /**
358             * Returns the user group persistence.
359             *
360             * @return the user group persistence
361             */
362            public UserGroupPersistence getUserGroupPersistence() {
363                    return userGroupPersistence;
364            }
365    
366            /**
367             * Sets the user group persistence.
368             *
369             * @param userGroupPersistence the user group persistence
370             */
371            public void setUserGroupPersistence(
372                    UserGroupPersistence userGroupPersistence) {
373                    this.userGroupPersistence = userGroupPersistence;
374            }
375    
376            /**
377             * Returns the user group finder.
378             *
379             * @return the user group finder
380             */
381            public UserGroupFinder getUserGroupFinder() {
382                    return userGroupFinder;
383            }
384    
385            /**
386             * Sets the user group finder.
387             *
388             * @param userGroupFinder the user group finder
389             */
390            public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
391                    this.userGroupFinder = userGroupFinder;
392            }
393    
394            public void afterPropertiesSet() {
395            }
396    
397            public void destroy() {
398            }
399    
400            /**
401             * Returns the Spring bean ID for this bean.
402             *
403             * @return the Spring bean ID for this bean
404             */
405            @Override
406            public String getBeanIdentifier() {
407                    return _beanIdentifier;
408            }
409    
410            /**
411             * Sets the Spring bean ID for this bean.
412             *
413             * @param beanIdentifier the Spring bean ID for this bean
414             */
415            @Override
416            public void setBeanIdentifier(String beanIdentifier) {
417                    _beanIdentifier = beanIdentifier;
418            }
419    
420            protected Class<?> getModelClass() {
421                    return Team.class;
422            }
423    
424            protected String getModelClassName() {
425                    return Team.class.getName();
426            }
427    
428            /**
429             * Performs a SQL query.
430             *
431             * @param sql the sql query
432             */
433            protected void runSQL(String sql) {
434                    try {
435                            DataSource dataSource = teamPersistence.getDataSource();
436    
437                            DB db = DBFactoryUtil.getDB();
438    
439                            sql = db.buildSQL(sql);
440                            sql = PortalUtil.transformSQL(sql);
441    
442                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
443                                            sql, new int[0]);
444    
445                            sqlUpdate.update();
446                    }
447                    catch (Exception e) {
448                            throw new SystemException(e);
449                    }
450            }
451    
452            @BeanReference(type = com.liferay.portal.service.TeamLocalService.class)
453            protected com.liferay.portal.service.TeamLocalService teamLocalService;
454            @BeanReference(type = com.liferay.portal.service.TeamService.class)
455            protected com.liferay.portal.service.TeamService teamService;
456            @BeanReference(type = TeamPersistence.class)
457            protected TeamPersistence teamPersistence;
458            @BeanReference(type = TeamFinder.class)
459            protected TeamFinder teamFinder;
460            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
461            protected com.liferay.counter.service.CounterLocalService counterLocalService;
462            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
463            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
464            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
465            protected com.liferay.portal.service.RoleLocalService roleLocalService;
466            @BeanReference(type = com.liferay.portal.service.RoleService.class)
467            protected com.liferay.portal.service.RoleService roleService;
468            @BeanReference(type = RolePersistence.class)
469            protected RolePersistence rolePersistence;
470            @BeanReference(type = RoleFinder.class)
471            protected RoleFinder roleFinder;
472            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
473            protected com.liferay.portal.service.UserLocalService userLocalService;
474            @BeanReference(type = com.liferay.portal.service.UserService.class)
475            protected com.liferay.portal.service.UserService userService;
476            @BeanReference(type = UserPersistence.class)
477            protected UserPersistence userPersistence;
478            @BeanReference(type = UserFinder.class)
479            protected UserFinder userFinder;
480            @BeanReference(type = com.liferay.portal.service.UserGroupLocalService.class)
481            protected com.liferay.portal.service.UserGroupLocalService userGroupLocalService;
482            @BeanReference(type = com.liferay.portal.service.UserGroupService.class)
483            protected com.liferay.portal.service.UserGroupService userGroupService;
484            @BeanReference(type = UserGroupPersistence.class)
485            protected UserGroupPersistence userGroupPersistence;
486            @BeanReference(type = UserGroupFinder.class)
487            protected UserGroupFinder userGroupFinder;
488            private String _beanIdentifier;
489    }