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