1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.asset.service.base;
16  
17  import com.liferay.counter.service.CounterLocalService;
18  
19  import com.liferay.portal.kernel.annotation.BeanReference;
20  import com.liferay.portal.kernel.dao.db.DB;
21  import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
22  import com.liferay.portal.kernel.dao.orm.DynamicQuery;
23  import com.liferay.portal.kernel.exception.PortalException;
24  import com.liferay.portal.kernel.exception.SystemException;
25  import com.liferay.portal.kernel.util.OrderByComparator;
26  import com.liferay.portal.service.ResourceLocalService;
27  import com.liferay.portal.service.ResourceService;
28  import com.liferay.portal.service.UserLocalService;
29  import com.liferay.portal.service.UserService;
30  import com.liferay.portal.service.persistence.ResourceFinder;
31  import com.liferay.portal.service.persistence.ResourcePersistence;
32  import com.liferay.portal.service.persistence.UserFinder;
33  import com.liferay.portal.service.persistence.UserPersistence;
34  
35  import com.liferay.portlet.asset.model.AssetTagProperty;
36  import com.liferay.portlet.asset.service.AssetCategoryLocalService;
37  import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
38  import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
39  import com.liferay.portlet.asset.service.AssetCategoryService;
40  import com.liferay.portlet.asset.service.AssetEntryLocalService;
41  import com.liferay.portlet.asset.service.AssetEntryService;
42  import com.liferay.portlet.asset.service.AssetLinkLocalService;
43  import com.liferay.portlet.asset.service.AssetTagLocalService;
44  import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
45  import com.liferay.portlet.asset.service.AssetTagPropertyService;
46  import com.liferay.portlet.asset.service.AssetTagService;
47  import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
48  import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
49  import com.liferay.portlet.asset.service.AssetVocabularyService;
50  import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
51  import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
52  import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
53  import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
54  import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
55  import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
56  import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
57  import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
58  import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
59  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
60  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
61  import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
62  import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
63  import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
64  
65  import java.util.List;
66  
67  /**
68   * <a href="AssetTagPropertyLocalServiceBaseImpl.java.html"><b><i>View Source
69   * </i></b></a>
70   *
71   * @author Brian Wing Shun Chan
72   */
73  public abstract class AssetTagPropertyLocalServiceBaseImpl
74      implements AssetTagPropertyLocalService {
75      public AssetTagProperty addAssetTagProperty(
76          AssetTagProperty assetTagProperty) throws SystemException {
77          assetTagProperty.setNew(true);
78  
79          return assetTagPropertyPersistence.update(assetTagProperty, false);
80      }
81  
82      public AssetTagProperty createAssetTagProperty(long tagPropertyId) {
83          return assetTagPropertyPersistence.create(tagPropertyId);
84      }
85  
86      public void deleteAssetTagProperty(long tagPropertyId)
87          throws PortalException, SystemException {
88          assetTagPropertyPersistence.remove(tagPropertyId);
89      }
90  
91      public void deleteAssetTagProperty(AssetTagProperty assetTagProperty)
92          throws SystemException {
93          assetTagPropertyPersistence.remove(assetTagProperty);
94      }
95  
96      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
97          throws SystemException {
98          return assetTagPropertyPersistence.findWithDynamicQuery(dynamicQuery);
99      }
100 
101     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
102         int end) throws SystemException {
103         return assetTagPropertyPersistence.findWithDynamicQuery(dynamicQuery,
104             start, end);
105     }
106 
107     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
108         int end, OrderByComparator orderByComparator) throws SystemException {
109         return assetTagPropertyPersistence.findWithDynamicQuery(dynamicQuery,
110             start, end, orderByComparator);
111     }
112 
113     public int dynamicQueryCount(DynamicQuery dynamicQuery)
114         throws SystemException {
115         return assetTagPropertyPersistence.countWithDynamicQuery(dynamicQuery);
116     }
117 
118     public AssetTagProperty getAssetTagProperty(long tagPropertyId)
119         throws PortalException, SystemException {
120         return assetTagPropertyPersistence.findByPrimaryKey(tagPropertyId);
121     }
122 
123     public List<AssetTagProperty> getAssetTagProperties(int start, int end)
124         throws SystemException {
125         return assetTagPropertyPersistence.findAll(start, end);
126     }
127 
128     public int getAssetTagPropertiesCount() throws SystemException {
129         return assetTagPropertyPersistence.countAll();
130     }
131 
132     public AssetTagProperty updateAssetTagProperty(
133         AssetTagProperty assetTagProperty) throws SystemException {
134         assetTagProperty.setNew(false);
135 
136         return assetTagPropertyPersistence.update(assetTagProperty, true);
137     }
138 
139     public AssetTagProperty updateAssetTagProperty(
140         AssetTagProperty assetTagProperty, boolean merge)
141         throws SystemException {
142         assetTagProperty.setNew(false);
143 
144         return assetTagPropertyPersistence.update(assetTagProperty, merge);
145     }
146 
147     public AssetCategoryLocalService getAssetCategoryLocalService() {
148         return assetCategoryLocalService;
149     }
150 
151     public void setAssetCategoryLocalService(
152         AssetCategoryLocalService assetCategoryLocalService) {
153         this.assetCategoryLocalService = assetCategoryLocalService;
154     }
155 
156     public AssetCategoryService getAssetCategoryService() {
157         return assetCategoryService;
158     }
159 
160     public void setAssetCategoryService(
161         AssetCategoryService assetCategoryService) {
162         this.assetCategoryService = assetCategoryService;
163     }
164 
165     public AssetCategoryPersistence getAssetCategoryPersistence() {
166         return assetCategoryPersistence;
167     }
168 
169     public void setAssetCategoryPersistence(
170         AssetCategoryPersistence assetCategoryPersistence) {
171         this.assetCategoryPersistence = assetCategoryPersistence;
172     }
173 
174     public AssetCategoryFinder getAssetCategoryFinder() {
175         return assetCategoryFinder;
176     }
177 
178     public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
179         this.assetCategoryFinder = assetCategoryFinder;
180     }
181 
182     public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
183         return assetCategoryPropertyLocalService;
184     }
185 
186     public void setAssetCategoryPropertyLocalService(
187         AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
188         this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
189     }
190 
191     public AssetCategoryPropertyService getAssetCategoryPropertyService() {
192         return assetCategoryPropertyService;
193     }
194 
195     public void setAssetCategoryPropertyService(
196         AssetCategoryPropertyService assetCategoryPropertyService) {
197         this.assetCategoryPropertyService = assetCategoryPropertyService;
198     }
199 
200     public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
201         return assetCategoryPropertyPersistence;
202     }
203 
204     public void setAssetCategoryPropertyPersistence(
205         AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
206         this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
207     }
208 
209     public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
210         return assetCategoryPropertyFinder;
211     }
212 
213     public void setAssetCategoryPropertyFinder(
214         AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
215         this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
216     }
217 
218     public AssetEntryLocalService getAssetEntryLocalService() {
219         return assetEntryLocalService;
220     }
221 
222     public void setAssetEntryLocalService(
223         AssetEntryLocalService assetEntryLocalService) {
224         this.assetEntryLocalService = assetEntryLocalService;
225     }
226 
227     public AssetEntryService getAssetEntryService() {
228         return assetEntryService;
229     }
230 
231     public void setAssetEntryService(AssetEntryService assetEntryService) {
232         this.assetEntryService = assetEntryService;
233     }
234 
235     public AssetEntryPersistence getAssetEntryPersistence() {
236         return assetEntryPersistence;
237     }
238 
239     public void setAssetEntryPersistence(
240         AssetEntryPersistence assetEntryPersistence) {
241         this.assetEntryPersistence = assetEntryPersistence;
242     }
243 
244     public AssetEntryFinder getAssetEntryFinder() {
245         return assetEntryFinder;
246     }
247 
248     public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
249         this.assetEntryFinder = assetEntryFinder;
250     }
251 
252     public AssetLinkLocalService getAssetLinkLocalService() {
253         return assetLinkLocalService;
254     }
255 
256     public void setAssetLinkLocalService(
257         AssetLinkLocalService assetLinkLocalService) {
258         this.assetLinkLocalService = assetLinkLocalService;
259     }
260 
261     public AssetLinkPersistence getAssetLinkPersistence() {
262         return assetLinkPersistence;
263     }
264 
265     public void setAssetLinkPersistence(
266         AssetLinkPersistence assetLinkPersistence) {
267         this.assetLinkPersistence = assetLinkPersistence;
268     }
269 
270     public AssetTagLocalService getAssetTagLocalService() {
271         return assetTagLocalService;
272     }
273 
274     public void setAssetTagLocalService(
275         AssetTagLocalService assetTagLocalService) {
276         this.assetTagLocalService = assetTagLocalService;
277     }
278 
279     public AssetTagService getAssetTagService() {
280         return assetTagService;
281     }
282 
283     public void setAssetTagService(AssetTagService assetTagService) {
284         this.assetTagService = assetTagService;
285     }
286 
287     public AssetTagPersistence getAssetTagPersistence() {
288         return assetTagPersistence;
289     }
290 
291     public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
292         this.assetTagPersistence = assetTagPersistence;
293     }
294 
295     public AssetTagFinder getAssetTagFinder() {
296         return assetTagFinder;
297     }
298 
299     public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
300         this.assetTagFinder = assetTagFinder;
301     }
302 
303     public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
304         return assetTagPropertyLocalService;
305     }
306 
307     public void setAssetTagPropertyLocalService(
308         AssetTagPropertyLocalService assetTagPropertyLocalService) {
309         this.assetTagPropertyLocalService = assetTagPropertyLocalService;
310     }
311 
312     public AssetTagPropertyService getAssetTagPropertyService() {
313         return assetTagPropertyService;
314     }
315 
316     public void setAssetTagPropertyService(
317         AssetTagPropertyService assetTagPropertyService) {
318         this.assetTagPropertyService = assetTagPropertyService;
319     }
320 
321     public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
322         return assetTagPropertyPersistence;
323     }
324 
325     public void setAssetTagPropertyPersistence(
326         AssetTagPropertyPersistence assetTagPropertyPersistence) {
327         this.assetTagPropertyPersistence = assetTagPropertyPersistence;
328     }
329 
330     public AssetTagPropertyFinder getAssetTagPropertyFinder() {
331         return assetTagPropertyFinder;
332     }
333 
334     public void setAssetTagPropertyFinder(
335         AssetTagPropertyFinder assetTagPropertyFinder) {
336         this.assetTagPropertyFinder = assetTagPropertyFinder;
337     }
338 
339     public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
340         return assetTagPropertyKeyFinder;
341     }
342 
343     public void setAssetTagPropertyKeyFinder(
344         AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
345         this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
346     }
347 
348     public AssetTagStatsLocalService getAssetTagStatsLocalService() {
349         return assetTagStatsLocalService;
350     }
351 
352     public void setAssetTagStatsLocalService(
353         AssetTagStatsLocalService assetTagStatsLocalService) {
354         this.assetTagStatsLocalService = assetTagStatsLocalService;
355     }
356 
357     public AssetTagStatsPersistence getAssetTagStatsPersistence() {
358         return assetTagStatsPersistence;
359     }
360 
361     public void setAssetTagStatsPersistence(
362         AssetTagStatsPersistence assetTagStatsPersistence) {
363         this.assetTagStatsPersistence = assetTagStatsPersistence;
364     }
365 
366     public AssetVocabularyLocalService getAssetVocabularyLocalService() {
367         return assetVocabularyLocalService;
368     }
369 
370     public void setAssetVocabularyLocalService(
371         AssetVocabularyLocalService assetVocabularyLocalService) {
372         this.assetVocabularyLocalService = assetVocabularyLocalService;
373     }
374 
375     public AssetVocabularyService getAssetVocabularyService() {
376         return assetVocabularyService;
377     }
378 
379     public void setAssetVocabularyService(
380         AssetVocabularyService assetVocabularyService) {
381         this.assetVocabularyService = assetVocabularyService;
382     }
383 
384     public AssetVocabularyPersistence getAssetVocabularyPersistence() {
385         return assetVocabularyPersistence;
386     }
387 
388     public void setAssetVocabularyPersistence(
389         AssetVocabularyPersistence assetVocabularyPersistence) {
390         this.assetVocabularyPersistence = assetVocabularyPersistence;
391     }
392 
393     public CounterLocalService getCounterLocalService() {
394         return counterLocalService;
395     }
396 
397     public void setCounterLocalService(CounterLocalService counterLocalService) {
398         this.counterLocalService = counterLocalService;
399     }
400 
401     public ResourceLocalService getResourceLocalService() {
402         return resourceLocalService;
403     }
404 
405     public void setResourceLocalService(
406         ResourceLocalService resourceLocalService) {
407         this.resourceLocalService = resourceLocalService;
408     }
409 
410     public ResourceService getResourceService() {
411         return resourceService;
412     }
413 
414     public void setResourceService(ResourceService resourceService) {
415         this.resourceService = resourceService;
416     }
417 
418     public ResourcePersistence getResourcePersistence() {
419         return resourcePersistence;
420     }
421 
422     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
423         this.resourcePersistence = resourcePersistence;
424     }
425 
426     public ResourceFinder getResourceFinder() {
427         return resourceFinder;
428     }
429 
430     public void setResourceFinder(ResourceFinder resourceFinder) {
431         this.resourceFinder = resourceFinder;
432     }
433 
434     public UserLocalService getUserLocalService() {
435         return userLocalService;
436     }
437 
438     public void setUserLocalService(UserLocalService userLocalService) {
439         this.userLocalService = userLocalService;
440     }
441 
442     public UserService getUserService() {
443         return userService;
444     }
445 
446     public void setUserService(UserService userService) {
447         this.userService = userService;
448     }
449 
450     public UserPersistence getUserPersistence() {
451         return userPersistence;
452     }
453 
454     public void setUserPersistence(UserPersistence userPersistence) {
455         this.userPersistence = userPersistence;
456     }
457 
458     public UserFinder getUserFinder() {
459         return userFinder;
460     }
461 
462     public void setUserFinder(UserFinder userFinder) {
463         this.userFinder = userFinder;
464     }
465 
466     protected void runSQL(String sql) throws SystemException {
467         try {
468             DB db = DBFactoryUtil.getDB();
469 
470             db.runSQL(sql);
471         }
472         catch (Exception e) {
473             throw new SystemException(e);
474         }
475     }
476 
477     @BeanReference(type = AssetCategoryLocalService.class)
478     protected AssetCategoryLocalService assetCategoryLocalService;
479     @BeanReference(type = AssetCategoryService.class)
480     protected AssetCategoryService assetCategoryService;
481     @BeanReference(type = AssetCategoryPersistence.class)
482     protected AssetCategoryPersistence assetCategoryPersistence;
483     @BeanReference(type = AssetCategoryFinder.class)
484     protected AssetCategoryFinder assetCategoryFinder;
485     @BeanReference(type = AssetCategoryPropertyLocalService.class)
486     protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
487     @BeanReference(type = AssetCategoryPropertyService.class)
488     protected AssetCategoryPropertyService assetCategoryPropertyService;
489     @BeanReference(type = AssetCategoryPropertyPersistence.class)
490     protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
491     @BeanReference(type = AssetCategoryPropertyFinder.class)
492     protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
493     @BeanReference(type = AssetEntryLocalService.class)
494     protected AssetEntryLocalService assetEntryLocalService;
495     @BeanReference(type = AssetEntryService.class)
496     protected AssetEntryService assetEntryService;
497     @BeanReference(type = AssetEntryPersistence.class)
498     protected AssetEntryPersistence assetEntryPersistence;
499     @BeanReference(type = AssetEntryFinder.class)
500     protected AssetEntryFinder assetEntryFinder;
501     @BeanReference(type = AssetLinkLocalService.class)
502     protected AssetLinkLocalService assetLinkLocalService;
503     @BeanReference(type = AssetLinkPersistence.class)
504     protected AssetLinkPersistence assetLinkPersistence;
505     @BeanReference(type = AssetTagLocalService.class)
506     protected AssetTagLocalService assetTagLocalService;
507     @BeanReference(type = AssetTagService.class)
508     protected AssetTagService assetTagService;
509     @BeanReference(type = AssetTagPersistence.class)
510     protected AssetTagPersistence assetTagPersistence;
511     @BeanReference(type = AssetTagFinder.class)
512     protected AssetTagFinder assetTagFinder;
513     @BeanReference(type = AssetTagPropertyLocalService.class)
514     protected AssetTagPropertyLocalService assetTagPropertyLocalService;
515     @BeanReference(type = AssetTagPropertyService.class)
516     protected AssetTagPropertyService assetTagPropertyService;
517     @BeanReference(type = AssetTagPropertyPersistence.class)
518     protected AssetTagPropertyPersistence assetTagPropertyPersistence;
519     @BeanReference(type = AssetTagPropertyFinder.class)
520     protected AssetTagPropertyFinder assetTagPropertyFinder;
521     @BeanReference(type = AssetTagPropertyKeyFinder.class)
522     protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
523     @BeanReference(type = AssetTagStatsLocalService.class)
524     protected AssetTagStatsLocalService assetTagStatsLocalService;
525     @BeanReference(type = AssetTagStatsPersistence.class)
526     protected AssetTagStatsPersistence assetTagStatsPersistence;
527     @BeanReference(type = AssetVocabularyLocalService.class)
528     protected AssetVocabularyLocalService assetVocabularyLocalService;
529     @BeanReference(type = AssetVocabularyService.class)
530     protected AssetVocabularyService assetVocabularyService;
531     @BeanReference(type = AssetVocabularyPersistence.class)
532     protected AssetVocabularyPersistence assetVocabularyPersistence;
533     @BeanReference(type = CounterLocalService.class)
534     protected CounterLocalService counterLocalService;
535     @BeanReference(type = ResourceLocalService.class)
536     protected ResourceLocalService resourceLocalService;
537     @BeanReference(type = ResourceService.class)
538     protected ResourceService resourceService;
539     @BeanReference(type = ResourcePersistence.class)
540     protected ResourcePersistence resourcePersistence;
541     @BeanReference(type = ResourceFinder.class)
542     protected ResourceFinder resourceFinder;
543     @BeanReference(type = UserLocalService.class)
544     protected UserLocalService userLocalService;
545     @BeanReference(type = UserService.class)
546     protected UserService userService;
547     @BeanReference(type = UserPersistence.class)
548     protected UserPersistence userPersistence;
549     @BeanReference(type = UserFinder.class)
550     protected UserFinder userFinder;
551 }