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