1   /**
2    * Copyright (c) 2000-2008 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.dao.orm.DynamicQuery;
31  import com.liferay.portal.service.UserLocalService;
32  import com.liferay.portal.service.UserService;
33  import com.liferay.portal.service.persistence.UserFinder;
34  import com.liferay.portal.service.persistence.UserPersistence;
35  
36  import com.liferay.portlet.social.model.SocialRequest;
37  import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
38  import com.liferay.portlet.social.service.SocialActivityLocalService;
39  import com.liferay.portlet.social.service.SocialRelationLocalService;
40  import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
41  import com.liferay.portlet.social.service.SocialRequestLocalService;
42  import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
43  import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
44  import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
45  import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
46  
47  import java.util.List;
48  
49  /**
50   * <a href="SocialRequestLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
51   *
52   * @author Brian Wing Shun Chan
53   *
54   */
55  public abstract class SocialRequestLocalServiceBaseImpl
56      implements SocialRequestLocalService {
57      public SocialRequest addSocialRequest(SocialRequest socialRequest)
58          throws SystemException {
59          socialRequest.setNew(true);
60  
61          return socialRequestPersistence.update(socialRequest, false);
62      }
63  
64      public SocialRequest createSocialRequest(long requestId) {
65          return socialRequestPersistence.create(requestId);
66      }
67  
68      public void deleteSocialRequest(long requestId)
69          throws PortalException, SystemException {
70          socialRequestPersistence.remove(requestId);
71      }
72  
73      public void deleteSocialRequest(SocialRequest socialRequest)
74          throws SystemException {
75          socialRequestPersistence.remove(socialRequest);
76      }
77  
78      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
79          throws SystemException {
80          return socialRequestPersistence.findWithDynamicQuery(dynamicQuery);
81      }
82  
83      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
84          int end) throws SystemException {
85          return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
86              start, end);
87      }
88  
89      public SocialRequest getSocialRequest(long requestId)
90          throws PortalException, SystemException {
91          return socialRequestPersistence.findByPrimaryKey(requestId);
92      }
93  
94      public List<SocialRequest> getSocialRequests(int start, int end)
95          throws SystemException {
96          return socialRequestPersistence.findAll(start, end);
97      }
98  
99      public int getSocialRequestsCount() throws SystemException {
100         return socialRequestPersistence.countAll();
101     }
102 
103     public SocialRequest updateSocialRequest(SocialRequest socialRequest)
104         throws SystemException {
105         socialRequest.setNew(false);
106 
107         return socialRequestPersistence.update(socialRequest, true);
108     }
109 
110     public SocialActivityLocalService getSocialActivityLocalService() {
111         return socialActivityLocalService;
112     }
113 
114     public void setSocialActivityLocalService(
115         SocialActivityLocalService socialActivityLocalService) {
116         this.socialActivityLocalService = socialActivityLocalService;
117     }
118 
119     public SocialActivityPersistence getSocialActivityPersistence() {
120         return socialActivityPersistence;
121     }
122 
123     public void setSocialActivityPersistence(
124         SocialActivityPersistence socialActivityPersistence) {
125         this.socialActivityPersistence = socialActivityPersistence;
126     }
127 
128     public SocialActivityFinder getSocialActivityFinder() {
129         return socialActivityFinder;
130     }
131 
132     public void setSocialActivityFinder(
133         SocialActivityFinder socialActivityFinder) {
134         this.socialActivityFinder = socialActivityFinder;
135     }
136 
137     public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
138         return socialActivityInterpreterLocalService;
139     }
140 
141     public void setSocialActivityInterpreterLocalService(
142         SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
143         this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
144     }
145 
146     public SocialRelationLocalService getSocialRelationLocalService() {
147         return socialRelationLocalService;
148     }
149 
150     public void setSocialRelationLocalService(
151         SocialRelationLocalService socialRelationLocalService) {
152         this.socialRelationLocalService = socialRelationLocalService;
153     }
154 
155     public SocialRelationPersistence getSocialRelationPersistence() {
156         return socialRelationPersistence;
157     }
158 
159     public void setSocialRelationPersistence(
160         SocialRelationPersistence socialRelationPersistence) {
161         this.socialRelationPersistence = socialRelationPersistence;
162     }
163 
164     public SocialRequestLocalService getSocialRequestLocalService() {
165         return socialRequestLocalService;
166     }
167 
168     public void setSocialRequestLocalService(
169         SocialRequestLocalService socialRequestLocalService) {
170         this.socialRequestLocalService = socialRequestLocalService;
171     }
172 
173     public SocialRequestPersistence getSocialRequestPersistence() {
174         return socialRequestPersistence;
175     }
176 
177     public void setSocialRequestPersistence(
178         SocialRequestPersistence socialRequestPersistence) {
179         this.socialRequestPersistence = socialRequestPersistence;
180     }
181 
182     public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
183         return socialRequestInterpreterLocalService;
184     }
185 
186     public void setSocialRequestInterpreterLocalService(
187         SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
188         this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
189     }
190 
191     public CounterLocalService getCounterLocalService() {
192         return counterLocalService;
193     }
194 
195     public void setCounterLocalService(CounterLocalService counterLocalService) {
196         this.counterLocalService = counterLocalService;
197     }
198 
199     public CounterService getCounterService() {
200         return counterService;
201     }
202 
203     public void setCounterService(CounterService counterService) {
204         this.counterService = counterService;
205     }
206 
207     public UserLocalService getUserLocalService() {
208         return userLocalService;
209     }
210 
211     public void setUserLocalService(UserLocalService userLocalService) {
212         this.userLocalService = userLocalService;
213     }
214 
215     public UserService getUserService() {
216         return userService;
217     }
218 
219     public void setUserService(UserService userService) {
220         this.userService = userService;
221     }
222 
223     public UserPersistence getUserPersistence() {
224         return userPersistence;
225     }
226 
227     public void setUserPersistence(UserPersistence userPersistence) {
228         this.userPersistence = userPersistence;
229     }
230 
231     public UserFinder getUserFinder() {
232         return userFinder;
233     }
234 
235     public void setUserFinder(UserFinder userFinder) {
236         this.userFinder = userFinder;
237     }
238 
239     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.SocialActivityLocalService.impl")
240     protected SocialActivityLocalService socialActivityLocalService;
241     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.persistence.SocialActivityPersistence.impl")
242     protected SocialActivityPersistence socialActivityPersistence;
243     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.persistence.SocialActivityFinder.impl")
244     protected SocialActivityFinder socialActivityFinder;
245     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.SocialActivityInterpreterLocalService.impl")
246     protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
247     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.SocialRelationLocalService.impl")
248     protected SocialRelationLocalService socialRelationLocalService;
249     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.persistence.SocialRelationPersistence.impl")
250     protected SocialRelationPersistence socialRelationPersistence;
251     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.SocialRequestLocalService.impl")
252     protected SocialRequestLocalService socialRequestLocalService;
253     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.persistence.SocialRequestPersistence.impl")
254     protected SocialRequestPersistence socialRequestPersistence;
255     @javax.annotation.Resource(name = "com.liferay.portlet.social.service.SocialRequestInterpreterLocalService.impl")
256     protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
257     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterLocalService.impl")
258     protected CounterLocalService counterLocalService;
259     @javax.annotation.Resource(name = "com.liferay.counter.service.CounterService.impl")
260     protected CounterService counterService;
261     @javax.annotation.Resource(name = "com.liferay.portal.service.UserLocalService.impl")
262     protected UserLocalService userLocalService;
263     @javax.annotation.Resource(name = "com.liferay.portal.service.UserService.impl")
264     protected UserService userService;
265     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
266     protected UserPersistence userPersistence;
267     @javax.annotation.Resource(name = "com.liferay.portal.service.persistence.UserFinder.impl")
268     protected UserFinder userFinder;
269 }