1
14
15 package com.liferay.portlet.tags.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.tags.model.TagsSource;
37 import com.liferay.portlet.tags.service.TagsAssetLocalService;
38 import com.liferay.portlet.tags.service.TagsAssetService;
39 import com.liferay.portlet.tags.service.TagsEntryLocalService;
40 import com.liferay.portlet.tags.service.TagsEntryService;
41 import com.liferay.portlet.tags.service.TagsPropertyLocalService;
42 import com.liferay.portlet.tags.service.TagsPropertyService;
43 import com.liferay.portlet.tags.service.TagsSourceLocalService;
44 import com.liferay.portlet.tags.service.TagsSourceService;
45 import com.liferay.portlet.tags.service.TagsVocabularyLocalService;
46 import com.liferay.portlet.tags.service.TagsVocabularyService;
47 import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
48 import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
49 import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
50 import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
51 import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
52 import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
53 import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
54 import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
55 import com.liferay.portlet.tags.service.persistence.TagsVocabularyPersistence;
56
57 import java.util.List;
58
59 import javax.sql.DataSource;
60
61
67 public abstract class TagsSourceLocalServiceBaseImpl
68 implements TagsSourceLocalService {
69 public TagsSource addTagsSource(TagsSource tagsSource)
70 throws SystemException {
71 tagsSource.setNew(true);
72
73 return tagsSourcePersistence.update(tagsSource, false);
74 }
75
76 public TagsSource createTagsSource(long sourceId) {
77 return tagsSourcePersistence.create(sourceId);
78 }
79
80 public void deleteTagsSource(long sourceId)
81 throws PortalException, SystemException {
82 tagsSourcePersistence.remove(sourceId);
83 }
84
85 public void deleteTagsSource(TagsSource tagsSource)
86 throws SystemException {
87 tagsSourcePersistence.remove(tagsSource);
88 }
89
90 @SuppressWarnings("rawtypes")
91 public List dynamicQuery(DynamicQuery dynamicQuery)
92 throws SystemException {
93 return tagsSourcePersistence.findWithDynamicQuery(dynamicQuery);
94 }
95
96 @SuppressWarnings("rawtypes")
97 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
98 throws SystemException {
99 return tagsSourcePersistence.findWithDynamicQuery(dynamicQuery, start,
100 end);
101 }
102
103 @SuppressWarnings("rawtypes")
104 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
105 OrderByComparator orderByComparator) throws SystemException {
106 return tagsSourcePersistence.findWithDynamicQuery(dynamicQuery, start,
107 end, orderByComparator);
108 }
109
110 public int dynamicQueryCount(DynamicQuery dynamicQuery)
111 throws SystemException {
112 return tagsSourcePersistence.countWithDynamicQuery(dynamicQuery);
113 }
114
115 public TagsSource getTagsSource(long sourceId)
116 throws PortalException, SystemException {
117 return tagsSourcePersistence.findByPrimaryKey(sourceId);
118 }
119
120 public List<TagsSource> getTagsSources(int start, int end)
121 throws SystemException {
122 return tagsSourcePersistence.findAll(start, end);
123 }
124
125 public int getTagsSourcesCount() throws SystemException {
126 return tagsSourcePersistence.countAll();
127 }
128
129 public TagsSource updateTagsSource(TagsSource tagsSource)
130 throws SystemException {
131 tagsSource.setNew(false);
132
133 return tagsSourcePersistence.update(tagsSource, true);
134 }
135
136 public TagsSource updateTagsSource(TagsSource tagsSource, boolean merge)
137 throws SystemException {
138 tagsSource.setNew(false);
139
140 return tagsSourcePersistence.update(tagsSource, merge);
141 }
142
143 public TagsAssetLocalService getTagsAssetLocalService() {
144 return tagsAssetLocalService;
145 }
146
147 public void setTagsAssetLocalService(
148 TagsAssetLocalService tagsAssetLocalService) {
149 this.tagsAssetLocalService = tagsAssetLocalService;
150 }
151
152 public TagsAssetService getTagsAssetService() {
153 return tagsAssetService;
154 }
155
156 public void setTagsAssetService(TagsAssetService tagsAssetService) {
157 this.tagsAssetService = tagsAssetService;
158 }
159
160 public TagsAssetPersistence getTagsAssetPersistence() {
161 return tagsAssetPersistence;
162 }
163
164 public void setTagsAssetPersistence(
165 TagsAssetPersistence tagsAssetPersistence) {
166 this.tagsAssetPersistence = tagsAssetPersistence;
167 }
168
169 public TagsAssetFinder getTagsAssetFinder() {
170 return tagsAssetFinder;
171 }
172
173 public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
174 this.tagsAssetFinder = tagsAssetFinder;
175 }
176
177 public TagsEntryLocalService getTagsEntryLocalService() {
178 return tagsEntryLocalService;
179 }
180
181 public void setTagsEntryLocalService(
182 TagsEntryLocalService tagsEntryLocalService) {
183 this.tagsEntryLocalService = tagsEntryLocalService;
184 }
185
186 public TagsEntryService getTagsEntryService() {
187 return tagsEntryService;
188 }
189
190 public void setTagsEntryService(TagsEntryService tagsEntryService) {
191 this.tagsEntryService = tagsEntryService;
192 }
193
194 public TagsEntryPersistence getTagsEntryPersistence() {
195 return tagsEntryPersistence;
196 }
197
198 public void setTagsEntryPersistence(
199 TagsEntryPersistence tagsEntryPersistence) {
200 this.tagsEntryPersistence = tagsEntryPersistence;
201 }
202
203 public TagsEntryFinder getTagsEntryFinder() {
204 return tagsEntryFinder;
205 }
206
207 public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
208 this.tagsEntryFinder = tagsEntryFinder;
209 }
210
211 public TagsPropertyLocalService getTagsPropertyLocalService() {
212 return tagsPropertyLocalService;
213 }
214
215 public void setTagsPropertyLocalService(
216 TagsPropertyLocalService tagsPropertyLocalService) {
217 this.tagsPropertyLocalService = tagsPropertyLocalService;
218 }
219
220 public TagsPropertyService getTagsPropertyService() {
221 return tagsPropertyService;
222 }
223
224 public void setTagsPropertyService(TagsPropertyService tagsPropertyService) {
225 this.tagsPropertyService = tagsPropertyService;
226 }
227
228 public TagsPropertyPersistence getTagsPropertyPersistence() {
229 return tagsPropertyPersistence;
230 }
231
232 public void setTagsPropertyPersistence(
233 TagsPropertyPersistence tagsPropertyPersistence) {
234 this.tagsPropertyPersistence = tagsPropertyPersistence;
235 }
236
237 public TagsPropertyFinder getTagsPropertyFinder() {
238 return tagsPropertyFinder;
239 }
240
241 public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
242 this.tagsPropertyFinder = tagsPropertyFinder;
243 }
244
245 public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
246 return tagsPropertyKeyFinder;
247 }
248
249 public void setTagsPropertyKeyFinder(
250 TagsPropertyKeyFinder tagsPropertyKeyFinder) {
251 this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
252 }
253
254 public TagsSourceLocalService getTagsSourceLocalService() {
255 return tagsSourceLocalService;
256 }
257
258 public void setTagsSourceLocalService(
259 TagsSourceLocalService tagsSourceLocalService) {
260 this.tagsSourceLocalService = tagsSourceLocalService;
261 }
262
263 public TagsSourceService getTagsSourceService() {
264 return tagsSourceService;
265 }
266
267 public void setTagsSourceService(TagsSourceService tagsSourceService) {
268 this.tagsSourceService = tagsSourceService;
269 }
270
271 public TagsSourcePersistence getTagsSourcePersistence() {
272 return tagsSourcePersistence;
273 }
274
275 public void setTagsSourcePersistence(
276 TagsSourcePersistence tagsSourcePersistence) {
277 this.tagsSourcePersistence = tagsSourcePersistence;
278 }
279
280 public TagsVocabularyLocalService getTagsVocabularyLocalService() {
281 return tagsVocabularyLocalService;
282 }
283
284 public void setTagsVocabularyLocalService(
285 TagsVocabularyLocalService tagsVocabularyLocalService) {
286 this.tagsVocabularyLocalService = tagsVocabularyLocalService;
287 }
288
289 public TagsVocabularyService getTagsVocabularyService() {
290 return tagsVocabularyService;
291 }
292
293 public void setTagsVocabularyService(
294 TagsVocabularyService tagsVocabularyService) {
295 this.tagsVocabularyService = tagsVocabularyService;
296 }
297
298 public TagsVocabularyPersistence getTagsVocabularyPersistence() {
299 return tagsVocabularyPersistence;
300 }
301
302 public void setTagsVocabularyPersistence(
303 TagsVocabularyPersistence tagsVocabularyPersistence) {
304 this.tagsVocabularyPersistence = tagsVocabularyPersistence;
305 }
306
307 public CounterLocalService getCounterLocalService() {
308 return counterLocalService;
309 }
310
311 public void setCounterLocalService(CounterLocalService counterLocalService) {
312 this.counterLocalService = counterLocalService;
313 }
314
315 public CounterService getCounterService() {
316 return counterService;
317 }
318
319 public void setCounterService(CounterService counterService) {
320 this.counterService = counterService;
321 }
322
323 public ResourceLocalService getResourceLocalService() {
324 return resourceLocalService;
325 }
326
327 public void setResourceLocalService(
328 ResourceLocalService resourceLocalService) {
329 this.resourceLocalService = resourceLocalService;
330 }
331
332 public ResourceService getResourceService() {
333 return resourceService;
334 }
335
336 public void setResourceService(ResourceService resourceService) {
337 this.resourceService = resourceService;
338 }
339
340 public ResourcePersistence getResourcePersistence() {
341 return resourcePersistence;
342 }
343
344 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
345 this.resourcePersistence = resourcePersistence;
346 }
347
348 public ResourceFinder getResourceFinder() {
349 return resourceFinder;
350 }
351
352 public void setResourceFinder(ResourceFinder resourceFinder) {
353 this.resourceFinder = resourceFinder;
354 }
355
356 public UserLocalService getUserLocalService() {
357 return userLocalService;
358 }
359
360 public void setUserLocalService(UserLocalService userLocalService) {
361 this.userLocalService = userLocalService;
362 }
363
364 public UserService getUserService() {
365 return userService;
366 }
367
368 public void setUserService(UserService userService) {
369 this.userService = userService;
370 }
371
372 public UserPersistence getUserPersistence() {
373 return userPersistence;
374 }
375
376 public void setUserPersistence(UserPersistence userPersistence) {
377 this.userPersistence = userPersistence;
378 }
379
380 public UserFinder getUserFinder() {
381 return userFinder;
382 }
383
384 public void setUserFinder(UserFinder userFinder) {
385 this.userFinder = userFinder;
386 }
387
388 protected void runSQL(String sql) throws SystemException {
389 try {
390 DataSource dataSource = tagsSourcePersistence.getDataSource();
391
392 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
393 sql, new int[0]);
394
395 sqlUpdate.update(new Object[0]);
396 }
397 catch (Exception e) {
398 throw new SystemException(e);
399 }
400 }
401
402 @BeanReference(type = TagsAssetLocalService.class)
403 protected TagsAssetLocalService tagsAssetLocalService;
404 @BeanReference(type = TagsAssetService.class)
405 protected TagsAssetService tagsAssetService;
406 @BeanReference(type = TagsAssetPersistence.class)
407 protected TagsAssetPersistence tagsAssetPersistence;
408 @BeanReference(type = TagsAssetFinder.class)
409 protected TagsAssetFinder tagsAssetFinder;
410 @BeanReference(type = TagsEntryLocalService.class)
411 protected TagsEntryLocalService tagsEntryLocalService;
412 @BeanReference(type = TagsEntryService.class)
413 protected TagsEntryService tagsEntryService;
414 @BeanReference(type = TagsEntryPersistence.class)
415 protected TagsEntryPersistence tagsEntryPersistence;
416 @BeanReference(type = TagsEntryFinder.class)
417 protected TagsEntryFinder tagsEntryFinder;
418 @BeanReference(type = TagsPropertyLocalService.class)
419 protected TagsPropertyLocalService tagsPropertyLocalService;
420 @BeanReference(type = TagsPropertyService.class)
421 protected TagsPropertyService tagsPropertyService;
422 @BeanReference(type = TagsPropertyPersistence.class)
423 protected TagsPropertyPersistence tagsPropertyPersistence;
424 @BeanReference(type = TagsPropertyFinder.class)
425 protected TagsPropertyFinder tagsPropertyFinder;
426 @BeanReference(type = TagsPropertyKeyFinder.class)
427 protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
428 @BeanReference(type = TagsSourceLocalService.class)
429 protected TagsSourceLocalService tagsSourceLocalService;
430 @BeanReference(type = TagsSourceService.class)
431 protected TagsSourceService tagsSourceService;
432 @BeanReference(type = TagsSourcePersistence.class)
433 protected TagsSourcePersistence tagsSourcePersistence;
434 @BeanReference(type = TagsVocabularyLocalService.class)
435 protected TagsVocabularyLocalService tagsVocabularyLocalService;
436 @BeanReference(type = TagsVocabularyService.class)
437 protected TagsVocabularyService tagsVocabularyService;
438 @BeanReference(type = TagsVocabularyPersistence.class)
439 protected TagsVocabularyPersistence tagsVocabularyPersistence;
440 @BeanReference(type = CounterLocalService.class)
441 protected CounterLocalService counterLocalService;
442 @BeanReference(type = CounterService.class)
443 protected CounterService counterService;
444 @BeanReference(type = ResourceLocalService.class)
445 protected ResourceLocalService resourceLocalService;
446 @BeanReference(type = ResourceService.class)
447 protected ResourceService resourceService;
448 @BeanReference(type = ResourcePersistence.class)
449 protected ResourcePersistence resourcePersistence;
450 @BeanReference(type = ResourceFinder.class)
451 protected ResourceFinder resourceFinder;
452 @BeanReference(type = UserLocalService.class)
453 protected UserLocalService userLocalService;
454 @BeanReference(type = UserService.class)
455 protected UserService userService;
456 @BeanReference(type = UserPersistence.class)
457 protected UserPersistence userPersistence;
458 @BeanReference(type = UserFinder.class)
459 protected UserFinder userFinder;
460 }