1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
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.db.DB;
21  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
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.GroupLocalService;
27  import com.liferay.portal.service.GroupService;
28  import com.liferay.portal.service.ResourceLocalService;
29  import com.liferay.portal.service.ResourceService;
30  import com.liferay.portal.service.UserLocalService;
31  import com.liferay.portal.service.UserService;
32  import com.liferay.portal.service.persistence.GroupFinder;
33  import com.liferay.portal.service.persistence.GroupPersistence;
34  import com.liferay.portal.service.persistence.ResourceFinder;
35  import com.liferay.portal.service.persistence.ResourcePersistence;
36  import com.liferay.portal.service.persistence.UserFinder;
37  import com.liferay.portal.service.persistence.UserPersistence;
38  
39  import com.liferay.portlet.asset.model.AssetVocabulary;
40  import com.liferay.portlet.asset.service.AssetCategoryLocalService;
41  import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
42  import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
43  import com.liferay.portlet.asset.service.AssetCategoryService;
44  import com.liferay.portlet.asset.service.AssetEntryLocalService;
45  import com.liferay.portlet.asset.service.AssetEntryService;
46  import com.liferay.portlet.asset.service.AssetLinkLocalService;
47  import com.liferay.portlet.asset.service.AssetTagLocalService;
48  import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
49  import com.liferay.portlet.asset.service.AssetTagPropertyService;
50  import com.liferay.portlet.asset.service.AssetTagService;
51  import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
52  import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
53  import com.liferay.portlet.asset.service.AssetVocabularyService;
54  import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
55  import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
56  import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
57  import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
58  import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
59  import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
60  import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
61  import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
62  import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
63  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
64  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
65  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
66  import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
67  import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
68  
69  import java.util.List;
70  
71  /**
72   * <a href="AssetVocabularyLocalServiceBaseImpl.java.html"><b><i>View Source</i>
73   * </b></a>
74   *
75   * @author Brian Wing Shun Chan
76   */
77  public abstract class AssetVocabularyLocalServiceBaseImpl
78      implements AssetVocabularyLocalService {
79      public AssetVocabulary addAssetVocabulary(AssetVocabulary assetVocabulary)
80          throws SystemException {
81          assetVocabulary.setNew(true);
82  
83          return assetVocabularyPersistence.update(assetVocabulary, false);
84      }
85  
86      public AssetVocabulary createAssetVocabulary(long vocabularyId) {
87          return assetVocabularyPersistence.create(vocabularyId);
88      }
89  
90      public void deleteAssetVocabulary(long vocabularyId)
91          throws PortalException, SystemException {
92          assetVocabularyPersistence.remove(vocabularyId);
93      }
94  
95      public void deleteAssetVocabulary(AssetVocabulary assetVocabulary)
96          throws SystemException {
97          assetVocabularyPersistence.remove(assetVocabulary);
98      }
99  
100     public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
101         throws SystemException {
102         return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery);
103     }
104 
105     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
106         int end) throws SystemException {
107         return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
108             start, end);
109     }
110 
111     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
112         int end, OrderByComparator orderByComparator) throws SystemException {
113         return assetVocabularyPersistence.findWithDynamicQuery(dynamicQuery,
114             start, end, orderByComparator);
115     }
116 
117     public int dynamicQueryCount(DynamicQuery dynamicQuery)
118         throws SystemException {
119         return assetVocabularyPersistence.countWithDynamicQuery(dynamicQuery);
120     }
121 
122     public AssetVocabulary getAssetVocabulary(long vocabularyId)
123         throws PortalException, SystemException {
124         return assetVocabularyPersistence.findByPrimaryKey(vocabularyId);
125     }
126 
127     public List<AssetVocabulary> getAssetVocabularies(int start, int end)
128         throws SystemException {
129         return assetVocabularyPersistence.findAll(start, end);
130     }
131 
132     public int getAssetVocabulariesCount() throws SystemException {
133         return assetVocabularyPersistence.countAll();
134     }
135 
136     public AssetVocabulary updateAssetVocabulary(
137         AssetVocabulary assetVocabulary) throws SystemException {
138         assetVocabulary.setNew(false);
139 
140         return assetVocabularyPersistence.update(assetVocabulary, true);
141     }
142 
143     public AssetVocabulary updateAssetVocabulary(
144         AssetVocabulary assetVocabulary, boolean merge)
145         throws SystemException {
146         assetVocabulary.setNew(false);
147 
148         return assetVocabularyPersistence.update(assetVocabulary, merge);
149     }
150 
151     public AssetCategoryLocalService getAssetCategoryLocalService() {
152         return assetCategoryLocalService;
153     }
154 
155     public void setAssetCategoryLocalService(
156         AssetCategoryLocalService assetCategoryLocalService) {
157         this.assetCategoryLocalService = assetCategoryLocalService;
158     }
159 
160     public AssetCategoryService getAssetCategoryService() {
161         return assetCategoryService;
162     }
163 
164     public void setAssetCategoryService(
165         AssetCategoryService assetCategoryService) {
166         this.assetCategoryService = assetCategoryService;
167     }
168 
169     public AssetCategoryPersistence getAssetCategoryPersistence() {
170         return assetCategoryPersistence;
171     }
172 
173     public void setAssetCategoryPersistence(
174         AssetCategoryPersistence assetCategoryPersistence) {
175         this.assetCategoryPersistence = assetCategoryPersistence;
176     }
177 
178     public AssetCategoryFinder getAssetCategoryFinder() {
179         return assetCategoryFinder;
180     }
181 
182     public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
183         this.assetCategoryFinder = assetCategoryFinder;
184     }
185 
186     public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
187         return assetCategoryPropertyLocalService;
188     }
189 
190     public void setAssetCategoryPropertyLocalService(
191         AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
192         this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
193     }
194 
195     public AssetCategoryPropertyService getAssetCategoryPropertyService() {
196         return assetCategoryPropertyService;
197     }
198 
199     public void setAssetCategoryPropertyService(
200         AssetCategoryPropertyService assetCategoryPropertyService) {
201         this.assetCategoryPropertyService = assetCategoryPropertyService;
202     }
203 
204     public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
205         return assetCategoryPropertyPersistence;
206     }
207 
208     public void setAssetCategoryPropertyPersistence(
209         AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
210         this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
211     }
212 
213     public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
214         return assetCategoryPropertyFinder;
215     }
216 
217     public void setAssetCategoryPropertyFinder(
218         AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
219         this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
220     }
221 
222     public AssetEntryLocalService getAssetEntryLocalService() {
223         return assetEntryLocalService;
224     }
225 
226     public void setAssetEntryLocalService(
227         AssetEntryLocalService assetEntryLocalService) {
228         this.assetEntryLocalService = assetEntryLocalService;
229     }
230 
231     public AssetEntryService getAssetEntryService() {
232         return assetEntryService;
233     }
234 
235     public void setAssetEntryService(AssetEntryService assetEntryService) {
236         this.assetEntryService = assetEntryService;
237     }
238 
239     public AssetEntryPersistence getAssetEntryPersistence() {
240         return assetEntryPersistence;
241     }
242 
243     public void setAssetEntryPersistence(
244         AssetEntryPersistence assetEntryPersistence) {
245         this.assetEntryPersistence = assetEntryPersistence;
246     }
247 
248     public AssetEntryFinder getAssetEntryFinder() {
249         return assetEntryFinder;
250     }
251 
252     public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
253         this.assetEntryFinder = assetEntryFinder;
254     }
255 
256     public AssetLinkLocalService getAssetLinkLocalService() {
257         return assetLinkLocalService;
258     }
259 
260     public void setAssetLinkLocalService(
261         AssetLinkLocalService assetLinkLocalService) {
262         this.assetLinkLocalService = assetLinkLocalService;
263     }
264 
265     public AssetLinkPersistence getAssetLinkPersistence() {
266         return assetLinkPersistence;
267     }
268 
269     public void setAssetLinkPersistence(
270         AssetLinkPersistence assetLinkPersistence) {
271         this.assetLinkPersistence = assetLinkPersistence;
272     }
273 
274     public AssetTagLocalService getAssetTagLocalService() {
275         return assetTagLocalService;
276     }
277 
278     public void setAssetTagLocalService(
279         AssetTagLocalService assetTagLocalService) {
280         this.assetTagLocalService = assetTagLocalService;
281     }
282 
283     public AssetTagService getAssetTagService() {
284         return assetTagService;
285     }
286 
287     public void setAssetTagService(AssetTagService assetTagService) {
288         this.assetTagService = assetTagService;
289     }
290 
291     public AssetTagPersistence getAssetTagPersistence() {
292         return assetTagPersistence;
293     }
294 
295     public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
296         this.assetTagPersistence = assetTagPersistence;
297     }
298 
299     public AssetTagFinder getAssetTagFinder() {
300         return assetTagFinder;
301     }
302 
303     public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
304         this.assetTagFinder = assetTagFinder;
305     }
306 
307     public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
308         return assetTagPropertyLocalService;
309     }
310 
311     public void setAssetTagPropertyLocalService(
312         AssetTagPropertyLocalService assetTagPropertyLocalService) {
313         this.assetTagPropertyLocalService = assetTagPropertyLocalService;
314     }
315 
316     public AssetTagPropertyService getAssetTagPropertyService() {
317         return assetTagPropertyService;
318     }
319 
320     public void setAssetTagPropertyService(
321         AssetTagPropertyService assetTagPropertyService) {
322         this.assetTagPropertyService = assetTagPropertyService;
323     }
324 
325     public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
326         return assetTagPropertyPersistence;
327     }
328 
329     public void setAssetTagPropertyPersistence(
330         AssetTagPropertyPersistence assetTagPropertyPersistence) {
331         this.assetTagPropertyPersistence = assetTagPropertyPersistence;
332     }
333 
334     public AssetTagPropertyFinder getAssetTagPropertyFinder() {
335         return assetTagPropertyFinder;
336     }
337 
338     public void setAssetTagPropertyFinder(
339         AssetTagPropertyFinder assetTagPropertyFinder) {
340         this.assetTagPropertyFinder = assetTagPropertyFinder;
341     }
342 
343     public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
344         return assetTagPropertyKeyFinder;
345     }
346 
347     public void setAssetTagPropertyKeyFinder(
348         AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
349         this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
350     }
351 
352     public AssetTagStatsLocalService getAssetTagStatsLocalService() {
353         return assetTagStatsLocalService;
354     }
355 
356     public void setAssetTagStatsLocalService(
357         AssetTagStatsLocalService assetTagStatsLocalService) {
358         this.assetTagStatsLocalService = assetTagStatsLocalService;
359     }
360 
361     public AssetTagStatsPersistence getAssetTagStatsPersistence() {
362         return assetTagStatsPersistence;
363     }
364 
365     public void setAssetTagStatsPersistence(
366         AssetTagStatsPersistence assetTagStatsPersistence) {
367         this.assetTagStatsPersistence = assetTagStatsPersistence;
368     }
369 
370     public AssetVocabularyLocalService getAssetVocabularyLocalService() {
371         return assetVocabularyLocalService;
372     }
373 
374     public void setAssetVocabularyLocalService(
375         AssetVocabularyLocalService assetVocabularyLocalService) {
376         this.assetVocabularyLocalService = assetVocabularyLocalService;
377     }
378 
379     public AssetVocabularyService getAssetVocabularyService() {
380         return assetVocabularyService;
381     }
382 
383     public void setAssetVocabularyService(
384         AssetVocabularyService assetVocabularyService) {
385         this.assetVocabularyService = assetVocabularyService;
386     }
387 
388     public AssetVocabularyPersistence getAssetVocabularyPersistence() {
389         return assetVocabularyPersistence;
390     }
391 
392     public void setAssetVocabularyPersistence(
393         AssetVocabularyPersistence assetVocabularyPersistence) {
394         this.assetVocabularyPersistence = assetVocabularyPersistence;
395     }
396 
397     public CounterLocalService getCounterLocalService() {
398         return counterLocalService;
399     }
400 
401     public void setCounterLocalService(CounterLocalService counterLocalService) {
402         this.counterLocalService = counterLocalService;
403     }
404 
405     public GroupLocalService getGroupLocalService() {
406         return groupLocalService;
407     }
408 
409     public void setGroupLocalService(GroupLocalService groupLocalService) {
410         this.groupLocalService = groupLocalService;
411     }
412 
413     public GroupService getGroupService() {
414         return groupService;
415     }
416 
417     public void setGroupService(GroupService groupService) {
418         this.groupService = groupService;
419     }
420 
421     public GroupPersistence getGroupPersistence() {
422         return groupPersistence;
423     }
424 
425     public void setGroupPersistence(GroupPersistence groupPersistence) {
426         this.groupPersistence = groupPersistence;
427     }
428 
429     public GroupFinder getGroupFinder() {
430         return groupFinder;
431     }
432 
433     public void setGroupFinder(GroupFinder groupFinder) {
434         this.groupFinder = groupFinder;
435     }
436 
437     public ResourceLocalService getResourceLocalService() {
438         return resourceLocalService;
439     }
440 
441     public void setResourceLocalService(
442         ResourceLocalService resourceLocalService) {
443         this.resourceLocalService = resourceLocalService;
444     }
445 
446     public ResourceService getResourceService() {
447         return resourceService;
448     }
449 
450     public void setResourceService(ResourceService resourceService) {
451         this.resourceService = resourceService;
452     }
453 
454     public ResourcePersistence getResourcePersistence() {
455         return resourcePersistence;
456     }
457 
458     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
459         this.resourcePersistence = resourcePersistence;
460     }
461 
462     public ResourceFinder getResourceFinder() {
463         return resourceFinder;
464     }
465 
466     public void setResourceFinder(ResourceFinder resourceFinder) {
467         this.resourceFinder = resourceFinder;
468     }
469 
470     public UserLocalService getUserLocalService() {
471         return userLocalService;
472     }
473 
474     public void setUserLocalService(UserLocalService userLocalService) {
475         this.userLocalService = userLocalService;
476     }
477 
478     public UserService getUserService() {
479         return userService;
480     }
481 
482     public void setUserService(UserService userService) {
483         this.userService = userService;
484     }
485 
486     public UserPersistence getUserPersistence() {
487         return userPersistence;
488     }
489 
490     public void setUserPersistence(UserPersistence userPersistence) {
491         this.userPersistence = userPersistence;
492     }
493 
494     public UserFinder getUserFinder() {
495         return userFinder;
496     }
497 
498     public void setUserFinder(UserFinder userFinder) {
499         this.userFinder = userFinder;
500     }
501 
502     protected void runSQL(String sql) throws SystemException {
503         try {
504             DB db = DBFactoryUtil.getDB();
505 
506             db.runSQL(sql);
507         }
508         catch (Exception e) {
509             throw new SystemException(e);
510         }
511     }
512 
513     @BeanReference(type = AssetCategoryLocalService.class)
514     protected AssetCategoryLocalService assetCategoryLocalService;
515     @BeanReference(type = AssetCategoryService.class)
516     protected AssetCategoryService assetCategoryService;
517     @BeanReference(type = AssetCategoryPersistence.class)
518     protected AssetCategoryPersistence assetCategoryPersistence;
519     @BeanReference(type = AssetCategoryFinder.class)
520     protected AssetCategoryFinder assetCategoryFinder;
521     @BeanReference(type = AssetCategoryPropertyLocalService.class)
522     protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
523     @BeanReference(type = AssetCategoryPropertyService.class)
524     protected AssetCategoryPropertyService assetCategoryPropertyService;
525     @BeanReference(type = AssetCategoryPropertyPersistence.class)
526     protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
527     @BeanReference(type = AssetCategoryPropertyFinder.class)
528     protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
529     @BeanReference(type = AssetEntryLocalService.class)
530     protected AssetEntryLocalService assetEntryLocalService;
531     @BeanReference(type = AssetEntryService.class)
532     protected AssetEntryService assetEntryService;
533     @BeanReference(type = AssetEntryPersistence.class)
534     protected AssetEntryPersistence assetEntryPersistence;
535     @BeanReference(type = AssetEntryFinder.class)
536     protected AssetEntryFinder assetEntryFinder;
537     @BeanReference(type = AssetLinkLocalService.class)
538     protected AssetLinkLocalService assetLinkLocalService;
539     @BeanReference(type = AssetLinkPersistence.class)
540     protected AssetLinkPersistence assetLinkPersistence;
541     @BeanReference(type = AssetTagLocalService.class)
542     protected AssetTagLocalService assetTagLocalService;
543     @BeanReference(type = AssetTagService.class)
544     protected AssetTagService assetTagService;
545     @BeanReference(type = AssetTagPersistence.class)
546     protected AssetTagPersistence assetTagPersistence;
547     @BeanReference(type = AssetTagFinder.class)
548     protected AssetTagFinder assetTagFinder;
549     @BeanReference(type = AssetTagPropertyLocalService.class)
550     protected AssetTagPropertyLocalService assetTagPropertyLocalService;
551     @BeanReference(type = AssetTagPropertyService.class)
552     protected AssetTagPropertyService assetTagPropertyService;
553     @BeanReference(type = AssetTagPropertyPersistence.class)
554     protected AssetTagPropertyPersistence assetTagPropertyPersistence;
555     @BeanReference(type = AssetTagPropertyFinder.class)
556     protected AssetTagPropertyFinder assetTagPropertyFinder;
557     @BeanReference(type = AssetTagPropertyKeyFinder.class)
558     protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
559     @BeanReference(type = AssetTagStatsLocalService.class)
560     protected AssetTagStatsLocalService assetTagStatsLocalService;
561     @BeanReference(type = AssetTagStatsPersistence.class)
562     protected AssetTagStatsPersistence assetTagStatsPersistence;
563     @BeanReference(type = AssetVocabularyLocalService.class)
564     protected AssetVocabularyLocalService assetVocabularyLocalService;
565     @BeanReference(type = AssetVocabularyService.class)
566     protected AssetVocabularyService assetVocabularyService;
567     @BeanReference(type = AssetVocabularyPersistence.class)
568     protected AssetVocabularyPersistence assetVocabularyPersistence;
569     @BeanReference(type = CounterLocalService.class)
570     protected CounterLocalService counterLocalService;
571     @BeanReference(type = GroupLocalService.class)
572     protected GroupLocalService groupLocalService;
573     @BeanReference(type = GroupService.class)
574     protected GroupService groupService;
575     @BeanReference(type = GroupPersistence.class)
576     protected GroupPersistence groupPersistence;
577     @BeanReference(type = GroupFinder.class)
578     protected GroupFinder groupFinder;
579     @BeanReference(type = ResourceLocalService.class)
580     protected ResourceLocalService resourceLocalService;
581     @BeanReference(type = ResourceService.class)
582     protected ResourceService resourceService;
583     @BeanReference(type = ResourcePersistence.class)
584     protected ResourcePersistence resourcePersistence;
585     @BeanReference(type = ResourceFinder.class)
586     protected ResourceFinder resourceFinder;
587     @BeanReference(type = UserLocalService.class)
588     protected UserLocalService userLocalService;
589     @BeanReference(type = UserService.class)
590     protected UserService userService;
591     @BeanReference(type = UserPersistence.class)
592     protected UserPersistence userPersistence;
593     @BeanReference(type = UserFinder.class)
594     protected UserFinder userFinder;
595 }