1
14
15 package com.liferay.portlet.asset.service.base;
16
17 import com.liferay.counter.service.CounterLocalService;
18
19 import com.liferay.portal.kernel.annotation.BeanReference;
20 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
21 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
22 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
23 import com.liferay.portal.kernel.exception.PortalException;
24 import com.liferay.portal.kernel.exception.SystemException;
25 import com.liferay.portal.kernel.util.OrderByComparator;
26 import com.liferay.portal.service.ResourceLocalService;
27 import com.liferay.portal.service.ResourceService;
28 import com.liferay.portal.service.UserLocalService;
29 import com.liferay.portal.service.UserService;
30 import com.liferay.portal.service.persistence.ResourceFinder;
31 import com.liferay.portal.service.persistence.ResourcePersistence;
32 import com.liferay.portal.service.persistence.UserFinder;
33 import com.liferay.portal.service.persistence.UserPersistence;
34
35 import com.liferay.portlet.asset.model.AssetTag;
36 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
37 import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
38 import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
39 import com.liferay.portlet.asset.service.AssetCategoryService;
40 import com.liferay.portlet.asset.service.AssetEntryLocalService;
41 import com.liferay.portlet.asset.service.AssetEntryService;
42 import com.liferay.portlet.asset.service.AssetLinkLocalService;
43 import com.liferay.portlet.asset.service.AssetTagLocalService;
44 import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
45 import com.liferay.portlet.asset.service.AssetTagPropertyService;
46 import com.liferay.portlet.asset.service.AssetTagService;
47 import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
48 import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
49 import com.liferay.portlet.asset.service.AssetVocabularyService;
50 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
51 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
52 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
53 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
54 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
55 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
56 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
57 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
58 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
59 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
60 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
61 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
62 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
63 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
64
65 import java.util.List;
66
67 import javax.sql.DataSource;
68
69
75 public abstract class AssetTagLocalServiceBaseImpl
76 implements AssetTagLocalService {
77 public AssetTag addAssetTag(AssetTag assetTag) throws SystemException {
78 assetTag.setNew(true);
79
80 return assetTagPersistence.update(assetTag, false);
81 }
82
83 public AssetTag createAssetTag(long tagId) {
84 return assetTagPersistence.create(tagId);
85 }
86
87 public void deleteAssetTag(long tagId)
88 throws PortalException, SystemException {
89 assetTagPersistence.remove(tagId);
90 }
91
92 public void deleteAssetTag(AssetTag assetTag) throws SystemException {
93 assetTagPersistence.remove(assetTag);
94 }
95
96 @SuppressWarnings("unchecked")
97 public List dynamicQuery(DynamicQuery dynamicQuery)
98 throws SystemException {
99 return assetTagPersistence.findWithDynamicQuery(dynamicQuery);
100 }
101
102 @SuppressWarnings("unchecked")
103 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
104 throws SystemException {
105 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start, end);
106 }
107
108 @SuppressWarnings("unchecked")
109 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
110 OrderByComparator orderByComparator) throws SystemException {
111 return assetTagPersistence.findWithDynamicQuery(dynamicQuery, start,
112 end, orderByComparator);
113 }
114
115 public long dynamicQueryCount(DynamicQuery dynamicQuery)
116 throws SystemException {
117 return assetTagPersistence.countWithDynamicQuery(dynamicQuery);
118 }
119
120 public AssetTag getAssetTag(long tagId)
121 throws PortalException, SystemException {
122 return assetTagPersistence.findByPrimaryKey(tagId);
123 }
124
125 public List<AssetTag> getAssetTags(int start, int end)
126 throws SystemException {
127 return assetTagPersistence.findAll(start, end);
128 }
129
130 public int getAssetTagsCount() throws SystemException {
131 return assetTagPersistence.countAll();
132 }
133
134 public AssetTag updateAssetTag(AssetTag assetTag) throws SystemException {
135 assetTag.setNew(false);
136
137 return assetTagPersistence.update(assetTag, true);
138 }
139
140 public AssetTag updateAssetTag(AssetTag assetTag, boolean merge)
141 throws SystemException {
142 assetTag.setNew(false);
143
144 return assetTagPersistence.update(assetTag, merge);
145 }
146
147 public AssetCategoryLocalService getAssetCategoryLocalService() {
148 return assetCategoryLocalService;
149 }
150
151 public void setAssetCategoryLocalService(
152 AssetCategoryLocalService assetCategoryLocalService) {
153 this.assetCategoryLocalService = assetCategoryLocalService;
154 }
155
156 public AssetCategoryService getAssetCategoryService() {
157 return assetCategoryService;
158 }
159
160 public void setAssetCategoryService(
161 AssetCategoryService assetCategoryService) {
162 this.assetCategoryService = assetCategoryService;
163 }
164
165 public AssetCategoryPersistence getAssetCategoryPersistence() {
166 return assetCategoryPersistence;
167 }
168
169 public void setAssetCategoryPersistence(
170 AssetCategoryPersistence assetCategoryPersistence) {
171 this.assetCategoryPersistence = assetCategoryPersistence;
172 }
173
174 public AssetCategoryFinder getAssetCategoryFinder() {
175 return assetCategoryFinder;
176 }
177
178 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
179 this.assetCategoryFinder = assetCategoryFinder;
180 }
181
182 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
183 return assetCategoryPropertyLocalService;
184 }
185
186 public void setAssetCategoryPropertyLocalService(
187 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
188 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
189 }
190
191 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
192 return assetCategoryPropertyService;
193 }
194
195 public void setAssetCategoryPropertyService(
196 AssetCategoryPropertyService assetCategoryPropertyService) {
197 this.assetCategoryPropertyService = assetCategoryPropertyService;
198 }
199
200 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
201 return assetCategoryPropertyPersistence;
202 }
203
204 public void setAssetCategoryPropertyPersistence(
205 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
206 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
207 }
208
209 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
210 return assetCategoryPropertyFinder;
211 }
212
213 public void setAssetCategoryPropertyFinder(
214 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
215 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
216 }
217
218 public AssetEntryLocalService getAssetEntryLocalService() {
219 return assetEntryLocalService;
220 }
221
222 public void setAssetEntryLocalService(
223 AssetEntryLocalService assetEntryLocalService) {
224 this.assetEntryLocalService = assetEntryLocalService;
225 }
226
227 public AssetEntryService getAssetEntryService() {
228 return assetEntryService;
229 }
230
231 public void setAssetEntryService(AssetEntryService assetEntryService) {
232 this.assetEntryService = assetEntryService;
233 }
234
235 public AssetEntryPersistence getAssetEntryPersistence() {
236 return assetEntryPersistence;
237 }
238
239 public void setAssetEntryPersistence(
240 AssetEntryPersistence assetEntryPersistence) {
241 this.assetEntryPersistence = assetEntryPersistence;
242 }
243
244 public AssetEntryFinder getAssetEntryFinder() {
245 return assetEntryFinder;
246 }
247
248 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
249 this.assetEntryFinder = assetEntryFinder;
250 }
251
252 public AssetLinkLocalService getAssetLinkLocalService() {
253 return assetLinkLocalService;
254 }
255
256 public void setAssetLinkLocalService(
257 AssetLinkLocalService assetLinkLocalService) {
258 this.assetLinkLocalService = assetLinkLocalService;
259 }
260
261 public AssetLinkPersistence getAssetLinkPersistence() {
262 return assetLinkPersistence;
263 }
264
265 public void setAssetLinkPersistence(
266 AssetLinkPersistence assetLinkPersistence) {
267 this.assetLinkPersistence = assetLinkPersistence;
268 }
269
270 public AssetTagLocalService getAssetTagLocalService() {
271 return assetTagLocalService;
272 }
273
274 public void setAssetTagLocalService(
275 AssetTagLocalService assetTagLocalService) {
276 this.assetTagLocalService = assetTagLocalService;
277 }
278
279 public AssetTagService getAssetTagService() {
280 return assetTagService;
281 }
282
283 public void setAssetTagService(AssetTagService assetTagService) {
284 this.assetTagService = assetTagService;
285 }
286
287 public AssetTagPersistence getAssetTagPersistence() {
288 return assetTagPersistence;
289 }
290
291 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
292 this.assetTagPersistence = assetTagPersistence;
293 }
294
295 public AssetTagFinder getAssetTagFinder() {
296 return assetTagFinder;
297 }
298
299 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
300 this.assetTagFinder = assetTagFinder;
301 }
302
303 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
304 return assetTagPropertyLocalService;
305 }
306
307 public void setAssetTagPropertyLocalService(
308 AssetTagPropertyLocalService assetTagPropertyLocalService) {
309 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
310 }
311
312 public AssetTagPropertyService getAssetTagPropertyService() {
313 return assetTagPropertyService;
314 }
315
316 public void setAssetTagPropertyService(
317 AssetTagPropertyService assetTagPropertyService) {
318 this.assetTagPropertyService = assetTagPropertyService;
319 }
320
321 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
322 return assetTagPropertyPersistence;
323 }
324
325 public void setAssetTagPropertyPersistence(
326 AssetTagPropertyPersistence assetTagPropertyPersistence) {
327 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
328 }
329
330 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
331 return assetTagPropertyFinder;
332 }
333
334 public void setAssetTagPropertyFinder(
335 AssetTagPropertyFinder assetTagPropertyFinder) {
336 this.assetTagPropertyFinder = assetTagPropertyFinder;
337 }
338
339 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
340 return assetTagPropertyKeyFinder;
341 }
342
343 public void setAssetTagPropertyKeyFinder(
344 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
345 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
346 }
347
348 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
349 return assetTagStatsLocalService;
350 }
351
352 public void setAssetTagStatsLocalService(
353 AssetTagStatsLocalService assetTagStatsLocalService) {
354 this.assetTagStatsLocalService = assetTagStatsLocalService;
355 }
356
357 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
358 return assetTagStatsPersistence;
359 }
360
361 public void setAssetTagStatsPersistence(
362 AssetTagStatsPersistence assetTagStatsPersistence) {
363 this.assetTagStatsPersistence = assetTagStatsPersistence;
364 }
365
366 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
367 return assetVocabularyLocalService;
368 }
369
370 public void setAssetVocabularyLocalService(
371 AssetVocabularyLocalService assetVocabularyLocalService) {
372 this.assetVocabularyLocalService = assetVocabularyLocalService;
373 }
374
375 public AssetVocabularyService getAssetVocabularyService() {
376 return assetVocabularyService;
377 }
378
379 public void setAssetVocabularyService(
380 AssetVocabularyService assetVocabularyService) {
381 this.assetVocabularyService = assetVocabularyService;
382 }
383
384 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
385 return assetVocabularyPersistence;
386 }
387
388 public void setAssetVocabularyPersistence(
389 AssetVocabularyPersistence assetVocabularyPersistence) {
390 this.assetVocabularyPersistence = assetVocabularyPersistence;
391 }
392
393 public CounterLocalService getCounterLocalService() {
394 return counterLocalService;
395 }
396
397 public void setCounterLocalService(CounterLocalService counterLocalService) {
398 this.counterLocalService = counterLocalService;
399 }
400
401 public ResourceLocalService getResourceLocalService() {
402 return resourceLocalService;
403 }
404
405 public void setResourceLocalService(
406 ResourceLocalService resourceLocalService) {
407 this.resourceLocalService = resourceLocalService;
408 }
409
410 public ResourceService getResourceService() {
411 return resourceService;
412 }
413
414 public void setResourceService(ResourceService resourceService) {
415 this.resourceService = resourceService;
416 }
417
418 public ResourcePersistence getResourcePersistence() {
419 return resourcePersistence;
420 }
421
422 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
423 this.resourcePersistence = resourcePersistence;
424 }
425
426 public ResourceFinder getResourceFinder() {
427 return resourceFinder;
428 }
429
430 public void setResourceFinder(ResourceFinder resourceFinder) {
431 this.resourceFinder = resourceFinder;
432 }
433
434 public UserLocalService getUserLocalService() {
435 return userLocalService;
436 }
437
438 public void setUserLocalService(UserLocalService userLocalService) {
439 this.userLocalService = userLocalService;
440 }
441
442 public UserService getUserService() {
443 return userService;
444 }
445
446 public void setUserService(UserService userService) {
447 this.userService = userService;
448 }
449
450 public UserPersistence getUserPersistence() {
451 return userPersistence;
452 }
453
454 public void setUserPersistence(UserPersistence userPersistence) {
455 this.userPersistence = userPersistence;
456 }
457
458 public UserFinder getUserFinder() {
459 return userFinder;
460 }
461
462 public void setUserFinder(UserFinder userFinder) {
463 this.userFinder = userFinder;
464 }
465
466 protected void runSQL(String sql) throws SystemException {
467 try {
468 DataSource dataSource = assetTagPersistence.getDataSource();
469
470 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
471 sql, new int[0]);
472
473 sqlUpdate.update();
474 }
475 catch (Exception e) {
476 throw new SystemException(e);
477 }
478 }
479
480 @BeanReference(type = AssetCategoryLocalService.class)
481 protected AssetCategoryLocalService assetCategoryLocalService;
482 @BeanReference(type = AssetCategoryService.class)
483 protected AssetCategoryService assetCategoryService;
484 @BeanReference(type = AssetCategoryPersistence.class)
485 protected AssetCategoryPersistence assetCategoryPersistence;
486 @BeanReference(type = AssetCategoryFinder.class)
487 protected AssetCategoryFinder assetCategoryFinder;
488 @BeanReference(type = AssetCategoryPropertyLocalService.class)
489 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
490 @BeanReference(type = AssetCategoryPropertyService.class)
491 protected AssetCategoryPropertyService assetCategoryPropertyService;
492 @BeanReference(type = AssetCategoryPropertyPersistence.class)
493 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
494 @BeanReference(type = AssetCategoryPropertyFinder.class)
495 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
496 @BeanReference(type = AssetEntryLocalService.class)
497 protected AssetEntryLocalService assetEntryLocalService;
498 @BeanReference(type = AssetEntryService.class)
499 protected AssetEntryService assetEntryService;
500 @BeanReference(type = AssetEntryPersistence.class)
501 protected AssetEntryPersistence assetEntryPersistence;
502 @BeanReference(type = AssetEntryFinder.class)
503 protected AssetEntryFinder assetEntryFinder;
504 @BeanReference(type = AssetLinkLocalService.class)
505 protected AssetLinkLocalService assetLinkLocalService;
506 @BeanReference(type = AssetLinkPersistence.class)
507 protected AssetLinkPersistence assetLinkPersistence;
508 @BeanReference(type = AssetTagLocalService.class)
509 protected AssetTagLocalService assetTagLocalService;
510 @BeanReference(type = AssetTagService.class)
511 protected AssetTagService assetTagService;
512 @BeanReference(type = AssetTagPersistence.class)
513 protected AssetTagPersistence assetTagPersistence;
514 @BeanReference(type = AssetTagFinder.class)
515 protected AssetTagFinder assetTagFinder;
516 @BeanReference(type = AssetTagPropertyLocalService.class)
517 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
518 @BeanReference(type = AssetTagPropertyService.class)
519 protected AssetTagPropertyService assetTagPropertyService;
520 @BeanReference(type = AssetTagPropertyPersistence.class)
521 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
522 @BeanReference(type = AssetTagPropertyFinder.class)
523 protected AssetTagPropertyFinder assetTagPropertyFinder;
524 @BeanReference(type = AssetTagPropertyKeyFinder.class)
525 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
526 @BeanReference(type = AssetTagStatsLocalService.class)
527 protected AssetTagStatsLocalService assetTagStatsLocalService;
528 @BeanReference(type = AssetTagStatsPersistence.class)
529 protected AssetTagStatsPersistence assetTagStatsPersistence;
530 @BeanReference(type = AssetVocabularyLocalService.class)
531 protected AssetVocabularyLocalService assetVocabularyLocalService;
532 @BeanReference(type = AssetVocabularyService.class)
533 protected AssetVocabularyService assetVocabularyService;
534 @BeanReference(type = AssetVocabularyPersistence.class)
535 protected AssetVocabularyPersistence assetVocabularyPersistence;
536 @BeanReference(type = CounterLocalService.class)
537 protected CounterLocalService counterLocalService;
538 @BeanReference(type = ResourceLocalService.class)
539 protected ResourceLocalService resourceLocalService;
540 @BeanReference(type = ResourceService.class)
541 protected ResourceService resourceService;
542 @BeanReference(type = ResourcePersistence.class)
543 protected ResourcePersistence resourcePersistence;
544 @BeanReference(type = ResourceFinder.class)
545 protected ResourceFinder resourceFinder;
546 @BeanReference(type = UserLocalService.class)
547 protected UserLocalService userLocalService;
548 @BeanReference(type = UserService.class)
549 protected UserService userService;
550 @BeanReference(type = UserPersistence.class)
551 protected UserPersistence userPersistence;
552 @BeanReference(type = UserFinder.class)
553 protected UserFinder userFinder;
554 }