1   /**
2    * Copyright (c) 2000-2009 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   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.base;
21  
22  import com.liferay.portal.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.BeanReference;
25  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
26  import com.liferay.portal.util.PortalUtil;
27  
28  import com.liferay.portlet.tags.model.TagsSource;
29  import com.liferay.portlet.tags.service.TagsAssetLocalService;
30  import com.liferay.portlet.tags.service.TagsAssetService;
31  import com.liferay.portlet.tags.service.TagsEntryLocalService;
32  import com.liferay.portlet.tags.service.TagsEntryService;
33  import com.liferay.portlet.tags.service.TagsPropertyLocalService;
34  import com.liferay.portlet.tags.service.TagsPropertyService;
35  import com.liferay.portlet.tags.service.TagsSourceLocalService;
36  import com.liferay.portlet.tags.service.TagsSourceService;
37  import com.liferay.portlet.tags.service.TagsVocabularyLocalService;
38  import com.liferay.portlet.tags.service.TagsVocabularyService;
39  import com.liferay.portlet.tags.service.persistence.TagsAssetFinder;
40  import com.liferay.portlet.tags.service.persistence.TagsAssetPersistence;
41  import com.liferay.portlet.tags.service.persistence.TagsEntryFinder;
42  import com.liferay.portlet.tags.service.persistence.TagsEntryPersistence;
43  import com.liferay.portlet.tags.service.persistence.TagsPropertyFinder;
44  import com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder;
45  import com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence;
46  import com.liferay.portlet.tags.service.persistence.TagsSourcePersistence;
47  import com.liferay.portlet.tags.service.persistence.TagsVocabularyPersistence;
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     public TagsVocabularyLocalService getTagsVocabularyLocalService() {
257         return tagsVocabularyLocalService;
258     }
259 
260     public void setTagsVocabularyLocalService(
261         TagsVocabularyLocalService tagsVocabularyLocalService) {
262         this.tagsVocabularyLocalService = tagsVocabularyLocalService;
263     }
264 
265     public TagsVocabularyService getTagsVocabularyService() {
266         return tagsVocabularyService;
267     }
268 
269     public void setTagsVocabularyService(
270         TagsVocabularyService tagsVocabularyService) {
271         this.tagsVocabularyService = tagsVocabularyService;
272     }
273 
274     public TagsVocabularyPersistence getTagsVocabularyPersistence() {
275         return tagsVocabularyPersistence;
276     }
277 
278     public void setTagsVocabularyPersistence(
279         TagsVocabularyPersistence tagsVocabularyPersistence) {
280         this.tagsVocabularyPersistence = tagsVocabularyPersistence;
281     }
282 
283     protected void runSQL(String sql) throws SystemException {
284         try {
285             PortalUtil.runSQL(sql);
286         }
287         catch (Exception e) {
288             throw new SystemException(e);
289         }
290     }
291 
292     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetLocalService.impl")
293     protected TagsAssetLocalService tagsAssetLocalService;
294     @BeanReference(name = "com.liferay.portlet.tags.service.TagsAssetService.impl")
295     protected TagsAssetService tagsAssetService;
296     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetPersistence.impl")
297     protected TagsAssetPersistence tagsAssetPersistence;
298     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsAssetFinder.impl")
299     protected TagsAssetFinder tagsAssetFinder;
300     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryLocalService.impl")
301     protected TagsEntryLocalService tagsEntryLocalService;
302     @BeanReference(name = "com.liferay.portlet.tags.service.TagsEntryService.impl")
303     protected TagsEntryService tagsEntryService;
304     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryPersistence.impl")
305     protected TagsEntryPersistence tagsEntryPersistence;
306     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsEntryFinder.impl")
307     protected TagsEntryFinder tagsEntryFinder;
308     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyLocalService.impl")
309     protected TagsPropertyLocalService tagsPropertyLocalService;
310     @BeanReference(name = "com.liferay.portlet.tags.service.TagsPropertyService.impl")
311     protected TagsPropertyService tagsPropertyService;
312     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyPersistence.impl")
313     protected TagsPropertyPersistence tagsPropertyPersistence;
314     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyFinder.impl")
315     protected TagsPropertyFinder tagsPropertyFinder;
316     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsPropertyKeyFinder.impl")
317     protected TagsPropertyKeyFinder tagsPropertyKeyFinder;
318     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceLocalService.impl")
319     protected TagsSourceLocalService tagsSourceLocalService;
320     @BeanReference(name = "com.liferay.portlet.tags.service.TagsSourceService.impl")
321     protected TagsSourceService tagsSourceService;
322     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsSourcePersistence.impl")
323     protected TagsSourcePersistence tagsSourcePersistence;
324     @BeanReference(name = "com.liferay.portlet.tags.service.TagsVocabularyLocalService.impl")
325     protected TagsVocabularyLocalService tagsVocabularyLocalService;
326     @BeanReference(name = "com.liferay.portlet.tags.service.TagsVocabularyService.impl")
327     protected TagsVocabularyService tagsVocabularyService;
328     @BeanReference(name = "com.liferay.portlet.tags.service.persistence.TagsVocabularyPersistence.impl")
329     protected TagsVocabularyPersistence tagsVocabularyPersistence;
330 }