1
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.bean.InitializingBean;
31 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
32 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
33 import com.liferay.portal.service.UserLocalService;
34 import com.liferay.portal.service.UserService;
35 import com.liferay.portal.service.persistence.UserFinder;
36 import com.liferay.portal.service.persistence.UserPersistence;
37
38 import com.liferay.portlet.social.model.SocialRequest;
39 import com.liferay.portlet.social.service.SocialActivityInterpreterLocalService;
40 import com.liferay.portlet.social.service.SocialActivityLocalService;
41 import com.liferay.portlet.social.service.SocialRelationLocalService;
42 import com.liferay.portlet.social.service.SocialRequestInterpreterLocalService;
43 import com.liferay.portlet.social.service.SocialRequestLocalService;
44 import com.liferay.portlet.social.service.persistence.SocialActivityFinder;
45 import com.liferay.portlet.social.service.persistence.SocialActivityPersistence;
46 import com.liferay.portlet.social.service.persistence.SocialRelationPersistence;
47 import com.liferay.portlet.social.service.persistence.SocialRequestPersistence;
48
49 import java.util.List;
50
51
57 public abstract class SocialRequestLocalServiceBaseImpl
58 implements SocialRequestLocalService, InitializingBean {
59 public SocialRequest addSocialRequest(SocialRequest socialRequest)
60 throws SystemException {
61 socialRequest.setNew(true);
62
63 return socialRequestPersistence.update(socialRequest, false);
64 }
65
66 public void deleteSocialRequest(long requestId)
67 throws PortalException, SystemException {
68 socialRequestPersistence.remove(requestId);
69 }
70
71 public void deleteSocialRequest(SocialRequest socialRequest)
72 throws SystemException {
73 socialRequestPersistence.remove(socialRequest);
74 }
75
76 public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
77 throws SystemException {
78 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery);
79 }
80
81 public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
82 int end) throws SystemException {
83 return socialRequestPersistence.findWithDynamicQuery(dynamicQuery,
84 start, end);
85 }
86
87 public SocialRequest getSocialRequest(long requestId)
88 throws PortalException, SystemException {
89 return socialRequestPersistence.findByPrimaryKey(requestId);
90 }
91
92 public List<SocialRequest> getSocialRequests(int start, int end)
93 throws SystemException {
94 return socialRequestPersistence.findAll(start, end);
95 }
96
97 public int getSocialRequestsCount() throws SystemException {
98 return socialRequestPersistence.countAll();
99 }
100
101 public SocialRequest updateSocialRequest(SocialRequest socialRequest)
102 throws SystemException {
103 socialRequest.setNew(false);
104
105 return socialRequestPersistence.update(socialRequest, 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 SocialRequestPersistence getSocialRequestPersistence() {
163 return socialRequestPersistence;
164 }
165
166 public void setSocialRequestPersistence(
167 SocialRequestPersistence socialRequestPersistence) {
168 this.socialRequestPersistence = socialRequestPersistence;
169 }
170
171 public SocialRequestInterpreterLocalService getSocialRequestInterpreterLocalService() {
172 return socialRequestInterpreterLocalService;
173 }
174
175 public void setSocialRequestInterpreterLocalService(
176 SocialRequestInterpreterLocalService socialRequestInterpreterLocalService) {
177 this.socialRequestInterpreterLocalService = socialRequestInterpreterLocalService;
178 }
179
180 public CounterLocalService getCounterLocalService() {
181 return counterLocalService;
182 }
183
184 public void setCounterLocalService(CounterLocalService counterLocalService) {
185 this.counterLocalService = counterLocalService;
186 }
187
188 public CounterService getCounterService() {
189 return counterService;
190 }
191
192 public void setCounterService(CounterService counterService) {
193 this.counterService = counterService;
194 }
195
196 public UserLocalService getUserLocalService() {
197 return userLocalService;
198 }
199
200 public void setUserLocalService(UserLocalService userLocalService) {
201 this.userLocalService = userLocalService;
202 }
203
204 public UserService getUserService() {
205 return userService;
206 }
207
208 public void setUserService(UserService userService) {
209 this.userService = userService;
210 }
211
212 public UserPersistence getUserPersistence() {
213 return userPersistence;
214 }
215
216 public void setUserPersistence(UserPersistence userPersistence) {
217 this.userPersistence = userPersistence;
218 }
219
220 public UserFinder getUserFinder() {
221 return userFinder;
222 }
223
224 public void setUserFinder(UserFinder userFinder) {
225 this.userFinder = userFinder;
226 }
227
228 public void afterPropertiesSet() {
229 if (socialActivityLocalService == null) {
230 socialActivityLocalService = (SocialActivityLocalService)PortalBeanLocatorUtil.locate(SocialActivityLocalService.class.getName() +
231 ".impl");
232 }
233
234 if (socialActivityPersistence == null) {
235 socialActivityPersistence = (SocialActivityPersistence)PortalBeanLocatorUtil.locate(SocialActivityPersistence.class.getName() +
236 ".impl");
237 }
238
239 if (socialActivityFinder == null) {
240 socialActivityFinder = (SocialActivityFinder)PortalBeanLocatorUtil.locate(SocialActivityFinder.class.getName() +
241 ".impl");
242 }
243
244 if (socialActivityInterpreterLocalService == null) {
245 socialActivityInterpreterLocalService = (SocialActivityInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialActivityInterpreterLocalService.class.getName() +
246 ".impl");
247 }
248
249 if (socialRelationLocalService == null) {
250 socialRelationLocalService = (SocialRelationLocalService)PortalBeanLocatorUtil.locate(SocialRelationLocalService.class.getName() +
251 ".impl");
252 }
253
254 if (socialRelationPersistence == null) {
255 socialRelationPersistence = (SocialRelationPersistence)PortalBeanLocatorUtil.locate(SocialRelationPersistence.class.getName() +
256 ".impl");
257 }
258
259 if (socialRequestPersistence == null) {
260 socialRequestPersistence = (SocialRequestPersistence)PortalBeanLocatorUtil.locate(SocialRequestPersistence.class.getName() +
261 ".impl");
262 }
263
264 if (socialRequestInterpreterLocalService == null) {
265 socialRequestInterpreterLocalService = (SocialRequestInterpreterLocalService)PortalBeanLocatorUtil.locate(SocialRequestInterpreterLocalService.class.getName() +
266 ".impl");
267 }
268
269 if (counterLocalService == null) {
270 counterLocalService = (CounterLocalService)PortalBeanLocatorUtil.locate(CounterLocalService.class.getName() +
271 ".impl");
272 }
273
274 if (counterService == null) {
275 counterService = (CounterService)PortalBeanLocatorUtil.locate(CounterService.class.getName() +
276 ".impl");
277 }
278
279 if (userLocalService == null) {
280 userLocalService = (UserLocalService)PortalBeanLocatorUtil.locate(UserLocalService.class.getName() +
281 ".impl");
282 }
283
284 if (userService == null) {
285 userService = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName() +
286 ".impl");
287 }
288
289 if (userPersistence == null) {
290 userPersistence = (UserPersistence)PortalBeanLocatorUtil.locate(UserPersistence.class.getName() +
291 ".impl");
292 }
293
294 if (userFinder == null) {
295 userFinder = (UserFinder)PortalBeanLocatorUtil.locate(UserFinder.class.getName() +
296 ".impl");
297 }
298 }
299
300 protected SocialActivityLocalService socialActivityLocalService;
301 protected SocialActivityPersistence socialActivityPersistence;
302 protected SocialActivityFinder socialActivityFinder;
303 protected SocialActivityInterpreterLocalService socialActivityInterpreterLocalService;
304 protected SocialRelationLocalService socialRelationLocalService;
305 protected SocialRelationPersistence socialRelationPersistence;
306 protected SocialRequestPersistence socialRequestPersistence;
307 protected SocialRequestInterpreterLocalService socialRequestInterpreterLocalService;
308 protected CounterLocalService counterLocalService;
309 protected CounterService counterService;
310 protected UserLocalService userLocalService;
311 protected UserService userService;
312 protected UserPersistence userPersistence;
313 protected UserFinder userFinder;
314 }