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