1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.tags.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.annotation.BeanReference;
31  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
32  import com.liferay.portal.service.ResourceLocalService;
33  import com.liferay.portal.service.ResourceService;
34  import com.liferay.portal.service.UserLocalService;
35  import com.liferay.portal.service.UserService;
36  import com.liferay.portal.service.persistence.ResourceFinder;
37  import com.liferay.portal.service.persistence.ResourcePersistence;
38  import com.liferay.portal.service.persistence.UserFinder;
39  import com.liferay.portal.service.persistence.UserPersistence;
40  import com.liferay.portal.util.PortalUtil;
41  
42  import com.liferay.portlet.tags.model.TagsEntry;
43  import com.liferay.portlet.tags.service.TagsAssetLocalService;
44  import com.liferay.portlet.tags.service.TagsAssetService;
45  import com.liferay.portlet.tags.service.TagsEntryLocalService;
46  import com.liferay.portlet.tags.service.TagsEntryService;
47  import com.liferay.portlet.tags.service.TagsPropertyLocalService;
48  import com.liferay.portlet.tags.service.TagsPropertyService;
49  import com.liferay.portlet.tags.service.TagsSourceLocalService;
50  import com.liferay.portlet.tags.service.TagsSourceService;
51  import com.liferay.portlet.tags.service.TagsVocabularyLocalService;
52  import com.liferay.portlet.tags.service.TagsVocabularyService;
53  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
54  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
55  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
56  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
57  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
58  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
59  import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
60  import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
61  import com.liferay.portlet.tags.service.persistence.TagsVocabularyPersistence;
62  
63  import java.util.List;
64  
65  /**
66   * <a href="TagsEntryLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
67   *
68   * @author Brian Wing Shun Chan
69   *
70   */
71  public abstract class TagsEntryLocalServiceBaseImpl
72      implements TagsEntryLocalService {
73      public TagsEntry addTagsEntry(TagsEntry tagsEntry)
74          throws SystemException {
75          tagsEntry.setNew(true);
76  
77          return tagsEntryPersistence.update(tagsEntry, false);
78      }
79  
80      public TagsEntry createTagsEntry(long entryId) {
81          return tagsEntryPersistence.create(entryId);
82      }
83  
84      public void deleteTagsEntry(long entryId)
85          throws PortalException, SystemException {
86          tagsEntryPersistence.remove(entryId);
87      }
88  
89      public void deleteTagsEntry(TagsEntry tagsEntry) throws SystemException {
90          tagsEntryPersistence.remove(tagsEntry);
91      }
92  
93      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
94          throws SystemException {
95          return tagsEntryPersistence.findWithDynamicQuery(dynamicQuery);
96      }
97  
98      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
99          int end) throws SystemException {
100         return tagsEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
101             end);
102     }
103 
104     public TagsEntry getTagsEntry(long entryId)
105         throws PortalException, SystemException {
106         return tagsEntryPersistence.findByPrimaryKey(entryId);
107     }
108 
109     public List<TagsEntry> getTagsEntries(int start, int end)
110         throws SystemException {
111         return tagsEntryPersistence.findAll(start, end);
112     }
113 
114     public int getTagsEntriesCount() throws SystemException {
115         return tagsEntryPersistence.countAll();
116     }
117 
118     public TagsEntry updateTagsEntry(TagsEntry tagsEntry)
119         throws SystemException {
120         tagsEntry.setNew(false);
121 
122         return tagsEntryPersistence.update(tagsEntry, true);
123     }
124 
125     public TagsEntry updateTagsEntry(TagsEntry tagsEntry, boolean merge)
126         throws SystemException {
127         tagsEntry.setNew(false);
128 
129         return tagsEntryPersistence.update(tagsEntry, merge);
130     }
131 
132     public TagsAssetLocalService getTagsAssetLocalService() {
133         return tagsAssetLocalService;
134     }
135 
136     public void setTagsAssetLocalService(
137         TagsAssetLocalService tagsAssetLocalService) {
138         this.tagsAssetLocalService = tagsAssetLocalService;
139     }
140 
141     public TagsAssetService getTagsAssetService() {
142         return tagsAssetService;
143     }
144 
145     public void setTagsAssetService(TagsAssetService tagsAssetService) {
146         this.tagsAssetService = tagsAssetService;
147     }
148 
149     public TagsAssetPersistence getTagsAssetPersistence() {
150         return tagsAssetPersistence;
151     }
152 
153     public void setTagsAssetPersistence(
154         TagsAssetPersistence tagsAssetPersistence) {
155         this.tagsAssetPersistence = tagsAssetPersistence;
156     }
157 
158     public TagsAssetFinder getTagsAssetFinder() {
159         return tagsAssetFinder;
160     }
161 
162     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
163         this.tagsAssetFinder = tagsAssetFinder;
164     }
165 
166     public TagsEntryLocalService getTagsEntryLocalService() {
167         return tagsEntryLocalService;
168     }
169 
170     public void setTagsEntryLocalService(
171         TagsEntryLocalService tagsEntryLocalService) {
172         this.tagsEntryLocalService = tagsEntryLocalService;
173     }
174 
175     public TagsEntryService getTagsEntryService() {
176         return tagsEntryService;
177     }
178 
179     public void setTagsEntryService(TagsEntryService tagsEntryService) {
180         this.tagsEntryService = tagsEntryService;
181     }
182 
183     public TagsEntryPersistence getTagsEntryPersistence() {
184         return tagsEntryPersistence;
185     }
186 
187     public void setTagsEntryPersistence(
188         TagsEntryPersistence tagsEntryPersistence) {
189         this.tagsEntryPersistence = tagsEntryPersistence;
190     }
191 
192     public TagsEntryFinder getTagsEntryFinder() {
193         return tagsEntryFinder;
194     }
195 
196     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
197         this.tagsEntryFinder = tagsEntryFinder;
198     }
199 
200     public TagsPropertyLocalService getTagsPropertyLocalService() {
201         return tagsPropertyLocalService;
202     }
203 
204     public void setTagsPropertyLocalService(
205         TagsPropertyLocalService tagsPropertyLocalService) {
206         this.tagsPropertyLocalService = tagsPropertyLocalService;
207     }
208 
209     public TagsPropertyService getTagsPropertyService() {
210         return tagsPropertyService;
211     }
212 
213     public void setTagsPropertyService(TagsPropertyService tagsPropertyService) {
214         this.tagsPropertyService = tagsPropertyService;
215     }
216 
217     public TagsPropertyPersistence getTagsPropertyPersistence() {
218         return tagsPropertyPersistence;
219     }
220 
221     public void setTagsPropertyPersistence(
222         TagsPropertyPersistence tagsPropertyPersistence) {
223         this.tagsPropertyPersistence = tagsPropertyPersistence;
224     }
225 
226     public TagsPropertyFinder getTagsPropertyFinder() {
227         return tagsPropertyFinder;
228     }
229 
230     public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
231         this.tagsPropertyFinder = tagsPropertyFinder;
232     }
233 
234     public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
235         return tagsPropertyKeyFinder;
236     }
237 
238     public void setTagsPropertyKeyFinder(
239         TagsPropertyKeyFinder tagsPropertyKeyFinder) {
240         this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
241     }
242 
243     public TagsSourceLocalService getTagsSourceLocalService() {
244         return tagsSourceLocalService;
245     }
246 
247     public void setTagsSourceLocalService(
248         TagsSourceLocalService tagsSourceLocalService) {
249         this.tagsSourceLocalService = tagsSourceLocalService;
250     }
251 
252     public TagsSourceService getTagsSourceService() {
253         return tagsSourceService;
254     }
255 
256     public void setTagsSourceService(TagsSourceService tagsSourceService) {
257         this.tagsSourceService = tagsSourceService;
258     }
259 
260     public TagsSourcePersistence getTagsSourcePersistence() {
261         return tagsSourcePersistence;
262     }
263 
264     public void setTagsSourcePersistence(
265         TagsSourcePersistence tagsSourcePersistence) {
266         this.tagsSourcePersistence = tagsSourcePersistence;
267     }
268 
269     public TagsVocabularyLocalService getTagsVocabularyLocalService() {
270         return tagsVocabularyLocalService;
271     }
272 
273     public void setTagsVocabularyLocalService(
274         TagsVocabularyLocalService tagsVocabularyLocalService) {
275         this.tagsVocabularyLocalService = tagsVocabularyLocalService;
276     }
277 
278     public TagsVocabularyService getTagsVocabularyService() {
279         return tagsVocabularyService;
280     }
281 
282     public void setTagsVocabularyService(
283         TagsVocabularyService tagsVocabularyService) {
284         this.tagsVocabularyService = tagsVocabularyService;
285     }
286 
287     public TagsVocabularyPersistence getTagsVocabularyPersistence() {
288         return tagsVocabularyPersistence;
289     }
290 
291     public void setTagsVocabularyPersistence(
292         TagsVocabularyPersistence tagsVocabularyPersistence) {
293         this.tagsVocabularyPersistence = tagsVocabularyPersistence;
294     }
295 
296     public CounterLocalService getCounterLocalService() {
297         return counterLocalService;
298     }
299 
300     public void setCounterLocalService(CounterLocalService counterLocalService) {
301         this.counterLocalService = counterLocalService;
302     }
303 
304     public CounterService getCounterService() {
305         return counterService;
306     }
307 
308     public void setCounterService(CounterService counterService) {
309         this.counterService = counterService;
310     }
311 
312     public ResourceLocalService getResourceLocalService() {
313         return resourceLocalService;
314     }
315 
316     public void setResourceLocalService(
317         ResourceLocalService resourceLocalService) {
318         this.resourceLocalService = resourceLocalService;
319     }
320 
321     public ResourceService getResourceService() {
322         return resourceService;
323     }
324 
325     public void setResourceService(ResourceService resourceService) {
326         this.resourceService = resourceService;
327     }
328 
329     public ResourcePersistence getResourcePersistence() {
330         return resourcePersistence;
331     }
332 
333     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
334         this.resourcePersistence = resourcePersistence;
335     }
336 
337     public ResourceFinder getResourceFinder() {
338         return resourceFinder;
339     }
340 
341     public void setResourceFinder(ResourceFinder resourceFinder) {
342         this.resourceFinder = resourceFinder;
343     }
344 
345     public UserLocalService getUserLocalService() {
346         return userLocalService;
347     }
348 
349     public void setUserLocalService(UserLocalService userLocalService) {
350         this.userLocalService = userLocalService;
351     }
352 
353     public UserService getUserService() {
354         return userService;
355     }
356 
357     public void setUserService(UserService userService) {
358         this.userService = userService;
359     }
360 
361     public UserPersistence getUserPersistence() {
362         return userPersistence;
363     }
364 
365     public void setUserPersistence(UserPersistence userPersistence) {
366         this.userPersistence = userPersistence;
367     }
368 
369     public UserFinder getUserFinder() {
370         return userFinder;
371     }
372 
373     public void setUserFinder(UserFinder userFinder) {
374         this.userFinder = userFinder;
375     }
376 
377     protected void runSQL(String sql) throws SystemException {
378         try {
379             PortalUtil.runSQL(sql);
380         }
381         catch (Exception e) {
382             throw new SystemException(e);
383         }
384     }
385 
386     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
387     protected TagsAssetLocalService tagsAssetLocalService;
388     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
389     protected TagsAssetService tagsAssetService;
390     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
391     protected TagsAssetPersistence tagsAssetPersistence;
392     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
393     protected TagsAssetFinder tagsAssetFinder;
394     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
395     protected TagsEntryLocalService tagsEntryLocalService;
396     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
397     protected TagsEntryService tagsEntryService;
398     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
399     protected TagsEntryPersistence tagsEntryPersistence;
400     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
401     protected TagsEntryFinder tagsEntryFinder;
402     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyLocalService.impl")
403     protected TagsPropertyLocalService tagsPropertyLocalService;
404     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyService.impl")
405     protected TagsPropertyService tagsPropertyService;
406     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence.impl")
407     protected TagsPropertyPersistence tagsPropertyPersistence;
408     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyFinder.impl")
409     protected TagsPropertyFinder tagsPropertyFinder;
410     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder.impl")
411     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
412     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceLocalService.impl")
413     protected TagsSourceLocalService tagsSourceLocalService;
414     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceService.impl")
415     protected TagsSourceService tagsSourceService;
416     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsSourcePersistence.impl")
417     protected TagsSourcePersistence tagsSourcePersistence;
418     @BeanReference(name = "com.liferay.portlet.tags.service.TagsVocabularyLocalService.impl")
419     protected TagsVocabularyLocalService tagsVocabularyLocalService;
420     @BeanReference(name = "com.liferay.portlet.tags.service.TagsVocabularyService.impl")
421     protected TagsVocabularyService tagsVocabularyService;
422     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsVocabularyPersistence.impl")
423     protected TagsVocabularyPersistence tagsVocabularyPersistence;
424     @BeanReference(name = "com.liferay.counter.service.CounterLocalService.impl")
425     protected CounterLocalService counterLocalService;
426     @BeanReference(name = "com.liferay.counter.service.CounterService.impl")
427     protected CounterService counterService;
428     @BeanReference(name = "com.liferay.portal.service.ResourceLocalService.impl")
429     protected ResourceLocalService resourceLocalService;
430     @BeanReference(name = "com.liferay.portal.service.ResourceService.impl")
431     protected ResourceService resourceService;
432     @BeanReference(name = "com.liferay.portal.service.persistence.ResourcePersistence.impl")
433     protected ResourcePersistence resourcePersistence;
434     @BeanReference(name = "com.liferay.portal.service.persistence.ResourceFinder.impl")
435     protected ResourceFinder resourceFinder;
436     @BeanReference(name = "com.liferay.portal.service.UserLocalService.impl")
437     protected UserLocalService userLocalService;
438     @BeanReference(name = "com.liferay.portal.service.UserService.impl")
439     protected UserService userService;
440     @BeanReference(name = "com.liferay.portal.service.persistence.UserPersistence.impl")
441     protected UserPersistence userPersistence;
442     @BeanReference(name = "com.liferay.portal.service.persistence.UserFinder.impl")
443     protected UserFinder userFinder;
444 }