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.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.BeanReference;
28  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
29  import com.liferay.portal.util.PortalUtil;
30  
31  import com.liferay.portlet.tags.model.TagsSource;
32  import com.liferay.portlet.tags.service.TagsAssetLocalService;
33  import com.liferay.portlet.tags.service.TagsAssetService;
34  import com.liferay.portlet.tags.service.TagsEntryLocalService;
35  import com.liferay.portlet.tags.service.TagsEntryService;
36  import com.liferay.portlet.tags.service.TagsPropertyLocalService;
37  import com.liferay.portlet.tags.service.TagsPropertyService;
38  import com.liferay.portlet.tags.service.TagsSourceLocalService;
39  import com.liferay.portlet.tags.service.TagsSourceService;
40  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
41  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
42  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
43  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
44  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
45  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
46  import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
47  import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
48  
49  import java.util.List;
50  
51  /**
52   * <a href="TagsSourceLocalServiceBaseImpl.java.html"><b><i>View Source</i></b></a>
53   *
54   * @author Brian Wing Shun Chan
55   *
56   */
57  public abstract class TagsSourceLocalServiceBaseImpl
58      implements TagsSourceLocalService {
59      public TagsSource addTagsSource(TagsSource tagsSource)
60          throws SystemException {
61          tagsSource.setNew(true);
62  
63          return tagsSourcePersistence.update(tagsSource, false);
64      }
65  
66      public TagsSource createTagsSource(long sourceId) {
67          return tagsSourcePersistence.create(sourceId);
68      }
69  
70      public void deleteTagsSource(long sourceId)
71          throws PortalException, SystemException {
72          tagsSourcePersistence.remove(sourceId);
73      }
74  
75      public void deleteTagsSource(TagsSource tagsSource)
76          throws SystemException {
77          tagsSourcePersistence.remove(tagsSource);
78      }
79  
80      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
81          throws SystemException {
82          return tagsSourcePersistence.findWithDynamicQuery(dynamicQuery);
83      }
84  
85      public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
86          int end) throws SystemException {
87          return tagsSourcePersistence.findWithDynamicQuery(dynamicQuery, start,
88              end);
89      }
90  
91      public TagsSource getTagsSource(long sourceId)
92          throws PortalException, SystemException {
93          return tagsSourcePersistence.findByPrimaryKey(sourceId);
94      }
95  
96      public List<TagsSource> getTagsSources(int start, int end)
97          throws SystemException {
98          return tagsSourcePersistence.findAll(start, end);
99      }
100 
101     public int getTagsSourcesCount() throws SystemException {
102         return tagsSourcePersistence.countAll();
103     }
104 
105     public TagsSource updateTagsSource(TagsSource tagsSource)
106         throws SystemException {
107         tagsSource.setNew(false);
108 
109         return tagsSourcePersistence.update(tagsSource, true);
110     }
111 
112     public TagsSource updateTagsSource(TagsSource tagsSource, boolean merge)
113         throws SystemException {
114         tagsSource.setNew(false);
115 
116         return tagsSourcePersistence.update(tagsSource, merge);
117     }
118 
119     public TagsAssetLocalService getTagsAssetLocalService() {
120         return tagsAssetLocalService;
121     }
122 
123     public void setTagsAssetLocalService(
124         TagsAssetLocalService tagsAssetLocalService) {
125         this.tagsAssetLocalService = tagsAssetLocalService;
126     }
127 
128     public TagsAssetService getTagsAssetService() {
129         return tagsAssetService;
130     }
131 
132     public void setTagsAssetService(TagsAssetService tagsAssetService) {
133         this.tagsAssetService = tagsAssetService;
134     }
135 
136     public TagsAssetPersistence getTagsAssetPersistence() {
137         return tagsAssetPersistence;
138     }
139 
140     public void setTagsAssetPersistence(
141         TagsAssetPersistence tagsAssetPersistence) {
142         this.tagsAssetPersistence = tagsAssetPersistence;
143     }
144 
145     public TagsAssetFinder getTagsAssetFinder() {
146         return tagsAssetFinder;
147     }
148 
149     public void setTagsAssetFinder(TagsAssetFinder tagsAssetFinder) {
150         this.tagsAssetFinder = tagsAssetFinder;
151     }
152 
153     public TagsEntryLocalService getTagsEntryLocalService() {
154         return tagsEntryLocalService;
155     }
156 
157     public void setTagsEntryLocalService(
158         TagsEntryLocalService tagsEntryLocalService) {
159         this.tagsEntryLocalService = tagsEntryLocalService;
160     }
161 
162     public TagsEntryService getTagsEntryService() {
163         return tagsEntryService;
164     }
165 
166     public void setTagsEntryService(TagsEntryService tagsEntryService) {
167         this.tagsEntryService = tagsEntryService;
168     }
169 
170     public TagsEntryPersistence getTagsEntryPersistence() {
171         return tagsEntryPersistence;
172     }
173 
174     public void setTagsEntryPersistence(
175         TagsEntryPersistence tagsEntryPersistence) {
176         this.tagsEntryPersistence = tagsEntryPersistence;
177     }
178 
179     public TagsEntryFinder getTagsEntryFinder() {
180         return tagsEntryFinder;
181     }
182 
183     public void setTagsEntryFinder(TagsEntryFinder tagsEntryFinder) {
184         this.tagsEntryFinder = tagsEntryFinder;
185     }
186 
187     public TagsPropertyLocalService getTagsPropertyLocalService() {
188         return tagsPropertyLocalService;
189     }
190 
191     public void setTagsPropertyLocalService(
192         TagsPropertyLocalService tagsPropertyLocalService) {
193         this.tagsPropertyLocalService = tagsPropertyLocalService;
194     }
195 
196     public TagsPropertyService getTagsPropertyService() {
197         return tagsPropertyService;
198     }
199 
200     public void setTagsPropertyService(TagsPropertyService tagsPropertyService) {
201         this.tagsPropertyService = tagsPropertyService;
202     }
203 
204     public TagsPropertyPersistence getTagsPropertyPersistence() {
205         return tagsPropertyPersistence;
206     }
207 
208     public void setTagsPropertyPersistence(
209         TagsPropertyPersistence tagsPropertyPersistence) {
210         this.tagsPropertyPersistence = tagsPropertyPersistence;
211     }
212 
213     public TagsPropertyFinder getTagsPropertyFinder() {
214         return tagsPropertyFinder;
215     }
216 
217     public void setTagsPropertyFinder(TagsPropertyFinder tagsPropertyFinder) {
218         this.tagsPropertyFinder = tagsPropertyFinder;
219     }
220 
221     public TagsPropertyKeyFinder getTagsPropertyKeyFinder() {
222         return tagsPropertyKeyFinder;
223     }
224 
225     public void setTagsPropertyKeyFinder(
226         TagsPropertyKeyFinder tagsPropertyKeyFinder) {
227         this.tagsPropertyKeyFinder = tagsPropertyKeyFinder;
228     }
229 
230     public TagsSourceLocalService getTagsSourceLocalService() {
231         return tagsSourceLocalService;
232     }
233 
234     public void setTagsSourceLocalService(
235         TagsSourceLocalService tagsSourceLocalService) {
236         this.tagsSourceLocalService = tagsSourceLocalService;
237     }
238 
239     public TagsSourceService getTagsSourceService() {
240         return tagsSourceService;
241     }
242 
243     public void setTagsSourceService(TagsSourceService tagsSourceService) {
244         this.tagsSourceService = tagsSourceService;
245     }
246 
247     public TagsSourcePersistence getTagsSourcePersistence() {
248         return tagsSourcePersistence;
249     }
250 
251     public void setTagsSourcePersistence(
252         TagsSourcePersistence tagsSourcePersistence) {
253         this.tagsSourcePersistence = tagsSourcePersistence;
254     }
255 
256     protected void runSQL(String sql) throws SystemException {
257         try {
258             PortalUtil.runSQL(sql);
259         }
260         catch (Exception e) {
261             throw new SystemException(e);
262         }
263     }
264 
265     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
266     protected TagsAssetLocalService tagsAssetLocalService;
267     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
268     protected TagsAssetService tagsAssetService;
269     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
270     protected TagsAssetPersistence tagsAssetPersistence;
271     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
272     protected TagsAssetFinder tagsAssetFinder;
273     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
274     protected TagsEntryLocalService tagsEntryLocalService;
275     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
276     protected TagsEntryService tagsEntryService;
277     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
278     protected TagsEntryPersistence tagsEntryPersistence;
279     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
280     protected TagsEntryFinder tagsEntryFinder;
281     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyLocalService.impl")
282     protected TagsPropertyLocalService tagsPropertyLocalService;
283     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyService.impl")
284     protected TagsPropertyService tagsPropertyService;
285     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence.impl")
286     protected TagsPropertyPersistence tagsPropertyPersistence;
287     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyFinder.impl")
288     protected TagsPropertyFinder tagsPropertyFinder;
289     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder.impl")
290     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
291     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceLocalService.impl")
292     protected TagsSourceLocalService tagsSourceLocalService;
293     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceService.impl")
294     protected TagsSourceService tagsSourceService;
295     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsSourcePersistence.impl")
296     protected TagsSourcePersistence tagsSourcePersistence;
297 }