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