1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.social.service.base;
24  
25  import com.liferay.counter.service.CounterLocalService;
26  import com.liferay.counter.service.CounterService;
27  
28  import com.liferay.portal.PortalException;
29  import com.liferay.portal.SystemException;
30  import com.liferay.portal.kernel.annotation.BeanReference;
31  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
32  import com.liferay.portal.service.UserLocalService;
33  import com.liferay.portal.service.UserService;
34  import com.liferay.portal.service.persistence.UserFinder;
35  import com.liferay.portal.service.persistence.UserPersistence;
36  
37  import com.liferay.portlet.social.model.SocialActivity;
38  import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
39  import com.liferay.portlet.social.service.SocialActivityLocalService;
40  import com.liferay.portlet.social.service.SocialRelationLocalService;
41  import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
42  import com.liferay.portlet.social.service.SocialRequestLocalService;
43  import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
44  import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
45  import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
46  import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
47  
48  import java.util.List;
49  
50  /**
51   * <a href="SocialActivityLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
52   *
53   * @author Brian Wing Shun Chan
54   *
55   */
56  public abstract class SocialActivityLocalServiceBaseImpl
57      implements SocialActivityLocalService {
58      public SocialActivity addSocialActivity(SocialActivity socialActivity)
59          throws SystemException {
60          socialActivity.setNew(true);
61  
62          return socialActivityPersistence.update(socialActivity, false);
63      }
64  
65      public SocialActivity createSocialActivity(long activityId) {
66          return socialActivityPersistence.create(activityId);
67      }
68  
69      public void deleteSocialActivity(long activityId)
70          throws PortalException, SystemException {
71          socialActivityPersistence.remove(activityId);
72      }
73  
74      public void deleteSocialActivity(SocialActivity socialActivity)
75          throws SystemException {
76          socialActivityPersistence.remove(socialActivity);
77      }
78  
79      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
80          throws SystemException {
81          return socialActivityPersistence.findWithDynamicQuery(dynamicQuery);
82      }
83  
84      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
85          int end) throws SystemException {
86          return socialActivityPersistence.findWithDynamicQuery(dynamicQuery,
87              start, end);
88      }
89  
90      public SocialActivity getSocialActivity(long activityId)
91          throws PortalException, SystemException {
92          return socialActivityPersistence.findByPrimaryKey(activityId);
93      }
94  
95      public List<SocialActivity> getSocialActivities(int start, int end)
96          throws SystemException {
97          return socialActivityPersistence.findAll(start, end);
98      }
99  
100     public int getSocialActivitiesCount() throws SystemException {
101         return socialActivityPersistence.countAll();
102     }
103 
104     public SocialActivity updateSocialActivity(SocialActivity socialActivity)
105         throws SystemException {
106         socialActivity.setNew(false);
107 
108         return socialActivityPersistence.update(socialActivity, true);
109     }
110 
111     public SocialActivityLocalService getSocialActivityLocalService() {
112         return socialActivityLocalService;
113     }
114 
115     public void setSocialActivityLocalService(
116         SocialActivityLocalService socialActivityLocalService) {
117         this.socialActivityLocalService = socialActivityLocalService;
118     }
119 
120     public SocialActivityPersistence getSocialActivityPersistence() {
121         return socialActivityPersistence;
122     }
123 
124     public void setSocialActivityPersistence(
125         SocialActivityPersistence socialActivityPersistence) {
126         this.socialActivityPersistence = socialActivityPersistence;
127     }
128 
129     public SocialActivityFinder getSocialActivityFinder() {
130         return socialActivityFinder;
131     }
132 
133     public void setSocialActivityFinder(
134         SocialActivityFinder socialActivityFinder) {
135         this.socialActivityFinder = socialActivityFinder;
136     }
137 
138     public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
139         return socialActivityInterpreterLocalService;
140     }
141 
142     public void setSocialActivityInterpreterLocalService(
143         SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
144         this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
145     }
146 
147     public SocialRelationLocalService getSocialRelationLocalService() {
148         return socialRelationLocalService;
149     }
150 
151     public void setSocialRelationLocalService(
152         SocialRelationLocalService socialRelationLocalService) {
153         this.socialRelationLocalService = socialRelationLocalService;
154     }
155 
156     public SocialRelationPersistence getSocialRelationPersistence() {
157         return socialRelationPersistence;
158     }
159 
160     public void setSocialRelationPersistence(
161         SocialRelationPersistence socialRelationPersistence) {
162         this.socialRelationPersistence = socialRelationPersistence;
163     }
164 
165     public SocialRequestLocalService getSocialRequestLocalService() {
166         return socialRequestLocalService;
167     }
168 
169     public void setSocialRequestLocalService(
170         SocialRequestLocalService socialRequestLocalService) {
171         this.socialRequestLocalService = socialRequestLocalService;
172     }
173 
174     public SocialRequestPersistence getSocialRequestPersistence() {
175         return socialRequestPersistence;
176     }
177 
178     public void setSocialRequestPersistence(
179         SocialRequestPersistence socialRequestPersistence) {
180         this.socialRequestPersistence = socialRequestPersistence;
181     }
182 
183     public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
184         return socialRequestInterpreterLocalService;
185     }
186 
187     public void setSocialRequestInterpreterLocalService(
188         SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
189         this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
190     }
191 
192     public CounterLocalService getCounterLocalService() {
193         return counterLocalService;
194     }
195 
196     public void setCounterLocalService(CounterLocalService counterLocalService) {
197         this.counterLocalService = counterLocalService;
198     }
199 
200     public CounterService getCounterService() {
201         return counterService;
202     }
203 
204     public void setCounterService(CounterService counterService) {
205         this.counterService = counterService;
206     }
207 
208     public UserLocalService getUserLocalService() {
209         return userLocalService;
210     }
211 
212     public void setUserLocalService(UserLocalService userLocalService) {
213         this.userLocalService = userLocalService;
214     }
215 
216     public UserService getUserService() {
217         return userService;
218     }
219 
220     public void setUserService(UserService userService) {
221         this.userService = userService;
222     }
223 
224     public UserPersistence getUserPersistence() {
225         return userPersistence;
226     }
227 
228     public void setUserPersistence(UserPersistence userPersistence) {
229         this.userPersistence = userPersistence;
230     }
231 
232     public UserFinder getUserFinder() {
233         return userFinder;
234     }
235 
236     public void setUserFinder(UserFinder userFinder) {
237         this.userFinder = userFinder;
238     }
239 
240     @BeanReference(name = "com.liferay.portlet.social.service.SocialActivityLocalService.impl")
241     protected SocialActivityLocalService socialActivityLocalService;
242     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityPersistence.impl")
243     protected SocialActivityPersistence socialActivityPersistence;
244     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialActivityFinder.impl")
245     protected SocialActivityFinder socialActivityFinder;
246     @BeanReference(name = "com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.impl")
247     protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
248     @BeanReference(name = "com.liferay.portlet.social.service.SocialRelationLocalService.impl")
249     protected SocialRelationLocalService socialRelationLocalService;
250     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialRelationPersistence.impl")
251     protected SocialRelationPersistence socialRelationPersistence;
252     @BeanReference(name = "com.liferay.portlet.social.service.SocialRequestLocalService.impl")
253     protected SocialRequestLocalService socialRequestLocalService;
254     @BeanReference(name = "com.liferay.portlet.social.service.persistence.SocialRequestPersistence.impl")
255     protected SocialRequestPersistence socialRequestPersistence;
256     @BeanReference(name = "com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.impl")
257     protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
258     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
259     protected CounterLocalService counterLocalService;
260     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
261     protected CounterService counterService;
262     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
263     protected UserLocalService userLocalService;
264     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
265     protected UserService userService;
266     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
267     protected UserPersistence userPersistence;
268     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
269     protected UserFinder userFinder;
270 }