1
14
15 package com.liferay.portlet.social.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18 import com.liferay.counter.service.CounterService;
19
20 import com.liferay.portal.PortalException;
21 import com.liferay.portal.SystemException;
22 import com.liferay.portal.kernel.annotation.BeanReference;
23 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
24 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
25 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26 import com.liferay.portal.kernel.util.OrderByComparator;
27 import com.liferay.portal.service.ResourceLocalService;
28 import com.liferay.portal.service.ResourceService;
29 import com.liferay.portal.service.UserLocalService;
30 import com.liferay.portal.service.UserService;
31 import com.liferay.portal.service.persistence.ResourceFinder;
32 import com.liferay.portal.service.persistence.ResourcePersistence;
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 import javax.sql.DataSource;
50
51
57 public abstract class SocialRequestLocalServiceBaseImpl
58 implements SocialRequestLocalService {
59 public SocialRequest addSocialRequest(SocialRequest socialRequest)
60 throws SystemException {
61 socialRequest.setNew(true);
62
63 return socialRequestPersistence.update(socialRequest, false);
64 }
65
66 public SocialRequest createSocialRequest(long requestId) {
67 return socialRequestPersistence.create(requestId);
68 }
69
70 public void deleteSocialRequest(long requestId)
71 throws PortalException, SystemException {
72 socialRequestPersistence.remove(requestId);
73 }
74
75 public void deleteSocialRequest(SocialRequest socialRequest)
76 throws SystemException {
77 socialRequestPersistence.remove(socialRequest);
78 }
79
80 @SuppressWarnings("rawtypes")
81 public List dynamicQuery(DynamicQuery dynamicQuery)
82 throws SystemException {
83 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery);
84 }
85
86 @SuppressWarnings("rawtypes")
87 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
88 throws SystemException {
89 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
90 start, end);
91 }
92
93 @SuppressWarnings("rawtypes")
94 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
95 OrderByComparator orderByComparator) throws SystemException {
96 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
97 start, end, orderByComparator);
98 }
99
100 public int dynamicQueryCount(DynamicQuery dynamicQuery)
101 throws SystemException {
102 return socialRequestPersistence.countWithDynamicQuery(dynamicQuery);
103 }
104
105 public SocialRequest getSocialRequest(long requestId)
106 throws PortalException, SystemException {
107 return socialRequestPersistence.findByPrimaryKey(requestId);
108 }
109
110 public SocialRequest getSocialRequestByUuidAndGroupId(String uuid,
111 long groupId) throws PortalException, SystemException {
112 return socialRequestPersistence.findByUUID_G(uuid, groupId);
113 }
114
115 public List<SocialRequest> getSocialRequests(int start, int end)
116 throws SystemException {
117 return socialRequestPersistence.findAll(start, end);
118 }
119
120 public int getSocialRequestsCount() throws SystemException {
121 return socialRequestPersistence.countAll();
122 }
123
124 public SocialRequest updateSocialRequest(SocialRequest socialRequest)
125 throws SystemException {
126 socialRequest.setNew(false);
127
128 return socialRequestPersistence.update(socialRequest, true);
129 }
130
131 public SocialRequest updateSocialRequest(SocialRequest socialRequest,
132 boolean merge) throws SystemException {
133 socialRequest.setNew(false);
134
135 return socialRequestPersistence.update(socialRequest, merge);
136 }
137
138 public SocialActivityLocalService getSocialActivityLocalService() {
139 return socialActivityLocalService;
140 }
141
142 public void setSocialActivityLocalService(
143 SocialActivityLocalService socialActivityLocalService) {
144 this.socialActivityLocalService = socialActivityLocalService;
145 }
146
147 public SocialActivityPersistence getSocialActivityPersistence() {
148 return socialActivityPersistence;
149 }
150
151 public void setSocialActivityPersistence(
152 SocialActivityPersistence socialActivityPersistence) {
153 this.socialActivityPersistence = socialActivityPersistence;
154 }
155
156 public SocialActivityFinder getSocialActivityFinder() {
157 return socialActivityFinder;
158 }
159
160 public void setSocialActivityFinder(
161 SocialActivityFinder socialActivityFinder) {
162 this.socialActivityFinder = socialActivityFinder;
163 }
164
165 public SocialActivityInterpreterLocalService getSocialActivityInterpreterLocalService() {
166 return socialActivityInterpreterLocalService;
167 }
168
169 public void setSocialActivityInterpreterLocalService(
170 SocialActivityInterpreterLocalService socialActivityInterpreterLocalService) {
171 this.socialActivityInterpreterLocalService = socialActivityInterpreterLocalService;
172 }
173
174 public SocialRelationLocalService getSocialRelationLocalService() {
175 return socialRelationLocalService;
176 }
177
178 public void setSocialRelationLocalService(
179 SocialRelationLocalService socialRelationLocalService) {
180 this.socialRelationLocalService = socialRelationLocalService;
181 }
182
183 public SocialRelationPersistence getSocialRelationPersistence() {
184 return socialRelationPersistence;
185 }
186
187 public void setSocialRelationPersistence(
188 SocialRelationPersistence socialRelationPersistence) {
189 this.socialRelationPersistence = socialRelationPersistence;
190 }
191
192 public SocialRequestLocalService getSocialRequestLocalService() {
193 return socialRequestLocalService;
194 }
195
196 public void setSocialRequestLocalService(
197 SocialRequestLocalService socialRequestLocalService) {
198 this.socialRequestLocalService = socialRequestLocalService;
199 }
200
201 public SocialRequestPersistence getSocialRequestPersistence() {
202 return socialRequestPersistence;
203 }
204
205 public void setSocialRequestPersistence(
206 SocialRequestPersistence socialRequestPersistence) {
207 this.socialRequestPersistence = socialRequestPersistence;
208 }
209
210 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
211 return socialRequestInterpreterLocalService;
212 }
213
214 public void setSocialRequestInterpreterLocalService(
215 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
216 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
217 }
218
219 public CounterLocalService getCounterLocalService() {
220 return counterLocalService;
221 }
222
223 public void setCounterLocalService(CounterLocalService counterLocalService) {
224 this.counterLocalService = counterLocalService;
225 }
226
227 public CounterService getCounterService() {
228 return counterService;
229 }
230
231 public void setCounterService(CounterService counterService) {
232 this.counterService = counterService;
233 }
234
235 public ResourceLocalService getResourceLocalService() {
236 return resourceLocalService;
237 }
238
239 public void setResourceLocalService(
240 ResourceLocalService resourceLocalService) {
241 this.resourceLocalService = resourceLocalService;
242 }
243
244 public ResourceService getResourceService() {
245 return resourceService;
246 }
247
248 public void setResourceService(ResourceService resourceService) {
249 this.resourceService = resourceService;
250 }
251
252 public ResourcePersistence getResourcePersistence() {
253 return resourcePersistence;
254 }
255
256 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
257 this.resourcePersistence = resourcePersistence;
258 }
259
260 public ResourceFinder getResourceFinder() {
261 return resourceFinder;
262 }
263
264 public void setResourceFinder(ResourceFinder resourceFinder) {
265 this.resourceFinder = resourceFinder;
266 }
267
268 public UserLocalService getUserLocalService() {
269 return userLocalService;
270 }
271
272 public void setUserLocalService(UserLocalService userLocalService) {
273 this.userLocalService = userLocalService;
274 }
275
276 public UserService getUserService() {
277 return userService;
278 }
279
280 public void setUserService(UserService userService) {
281 this.userService = userService;
282 }
283
284 public UserPersistence getUserPersistence() {
285 return userPersistence;
286 }
287
288 public void setUserPersistence(UserPersistence userPersistence) {
289 this.userPersistence = userPersistence;
290 }
291
292 public UserFinder getUserFinder() {
293 return userFinder;
294 }
295
296 public void setUserFinder(UserFinder userFinder) {
297 this.userFinder = userFinder;
298 }
299
300 protected void runSQL(String sql) throws SystemException {
301 try {
302 DataSource dataSource = socialRequestPersistence.getDataSource();
303
304 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
305 sql, new int[0]);
306
307 sqlUpdate.update(new Object[0]);
308 }
309 catch (Exception e) {
310 throw new SystemException(e);
311 }
312 }
313
314 @BeanReference(type = SocialActivityLocalService.class)
315 protected SocialActivityLocalService socialActivityLocalService;
316 @BeanReference(type = SocialActivityPersistence.class)
317 protected SocialActivityPersistence socialActivityPersistence;
318 @BeanReference(type = SocialActivityFinder.class)
319 protected SocialActivityFinder socialActivityFinder;
320 @BeanReference(type = SocialActivityInterpreterLocalService.class)
321 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
322 @BeanReference(type = SocialRelationLocalService.class)
323 protected SocialRelationLocalService socialRelationLocalService;
324 @BeanReference(type = SocialRelationPersistence.class)
325 protected SocialRelationPersistence socialRelationPersistence;
326 @BeanReference(type = SocialRequestLocalService.class)
327 protected SocialRequestLocalService socialRequestLocalService;
328 @BeanReference(type = SocialRequestPersistence.class)
329 protected SocialRequestPersistence socialRequestPersistence;
330 @BeanReference(type = SocialRequestInterpreterLocalService.class)
331 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
332 @BeanReference(type = CounterLocalService.class)
333 protected CounterLocalService counterLocalService;
334 @BeanReference(type = CounterService.class)
335 protected CounterService counterService;
336 @BeanReference(type = ResourceLocalService.class)
337 protected ResourceLocalService resourceLocalService;
338 @BeanReference(type = ResourceService.class)
339 protected ResourceService resourceService;
340 @BeanReference(type = ResourcePersistence.class)
341 protected ResourcePersistence resourcePersistence;
342 @BeanReference(type = ResourceFinder.class)
343 protected ResourceFinder resourceFinder;
344 @BeanReference(type = UserLocalService.class)
345 protected UserLocalService userLocalService;
346 @BeanReference(type = UserService.class)
347 protected UserService userService;
348 @BeanReference(type = UserPersistence.class)
349 protected UserPersistence userPersistence;
350 @BeanReference(type = UserFinder.class)
351 protected UserFinder userFinder;
352 }