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