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