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