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