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.AssetCategoryProperty;
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="AssetCategoryPropertyLocalServiceBaseImpl.java.html"><b><i>View
69   * Source</i></b></a>
70   *
71   * @author Brian Wing Shun Chan
72   */
73  public abstract class AssetCategoryPropertyLocalServiceBaseImpl
74      implements AssetCategoryPropertyLocalService {
75      public AssetCategoryProperty addAssetCategoryProperty(
76          AssetCategoryProperty assetCategoryProperty) throws SystemException {
77          assetCategoryProperty.setNew(true);
78  
79          return assetCategoryPropertyPersistence.update(assetCategoryProperty,
80              false);
81      }
82  
83      public AssetCategoryProperty createAssetCategoryProperty(
84          long categoryPropertyId) {
85          return assetCategoryPropertyPersistence.create(categoryPropertyId);
86      }
87  
88      public void deleteAssetCategoryProperty(long categoryPropertyId)
89          throws PortalException, SystemException {
90          assetCategoryPropertyPersistence.remove(categoryPropertyId);
91      }
92  
93      public void deleteAssetCategoryProperty(
94          AssetCategoryProperty assetCategoryProperty) throws SystemException {
95          assetCategoryPropertyPersistence.remove(assetCategoryProperty);
96      }
97  
98      public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
99          throws SystemException {
100         return assetCategoryPropertyPersistence.findWithDynamicQuery(dynamicQuery);
101     }
102 
103     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
104         int end) throws SystemException {
105         return assetCategoryPropertyPersistence.findWithDynamicQuery(dynamicQuery,
106             start, end);
107     }
108 
109     public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
110         int end, OrderByComparator orderByComparator) throws SystemException {
111         return assetCategoryPropertyPersistence.findWithDynamicQuery(dynamicQuery,
112             start, end, orderByComparator);
113     }
114 
115     public int dynamicQueryCount(DynamicQuery dynamicQuery)
116         throws SystemException {
117         return assetCategoryPropertyPersistence.countWithDynamicQuery(dynamicQuery);
118     }
119 
120     public AssetCategoryProperty getAssetCategoryProperty(
121         long categoryPropertyId) throws PortalException, SystemException {
122         return assetCategoryPropertyPersistence.findByPrimaryKey(categoryPropertyId);
123     }
124 
125     public List<AssetCategoryProperty> getAssetCategoryProperties(int start,
126         int end) throws SystemException {
127         return assetCategoryPropertyPersistence.findAll(start, end);
128     }
129 
130     public int getAssetCategoryPropertiesCount() throws SystemException {
131         return assetCategoryPropertyPersistence.countAll();
132     }
133 
134     public AssetCategoryProperty updateAssetCategoryProperty(
135         AssetCategoryProperty assetCategoryProperty) throws SystemException {
136         assetCategoryProperty.setNew(false);
137 
138         return assetCategoryPropertyPersistence.update(assetCategoryProperty,
139             true);
140     }
141 
142     public AssetCategoryProperty updateAssetCategoryProperty(
143         AssetCategoryProperty assetCategoryProperty, boolean merge)
144         throws SystemException {
145         assetCategoryProperty.setNew(false);
146 
147         return assetCategoryPropertyPersistence.update(assetCategoryProperty,
148             merge);
149     }
150 
151     public AssetCategoryLocalService getAssetCategoryLocalService() {
152         return assetCategoryLocalService;
153     }
154 
155     public void setAssetCategoryLocalService(
156         AssetCategoryLocalService assetCategoryLocalService) {
157         this.assetCategoryLocalService = assetCategoryLocalService;
158     }
159 
160     public AssetCategoryService getAssetCategoryService() {
161         return assetCategoryService;
162     }
163 
164     public void setAssetCategoryService(
165         AssetCategoryService assetCategoryService) {
166         this.assetCategoryService = assetCategoryService;
167     }
168 
169     public AssetCategoryPersistence getAssetCategoryPersistence() {
170         return assetCategoryPersistence;
171     }
172 
173     public void setAssetCategoryPersistence(
174         AssetCategoryPersistence assetCategoryPersistence) {
175         this.assetCategoryPersistence = assetCategoryPersistence;
176     }
177 
178     public AssetCategoryFinder getAssetCategoryFinder() {
179         return assetCategoryFinder;
180     }
181 
182     public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
183         this.assetCategoryFinder = assetCategoryFinder;
184     }
185 
186     public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
187         return assetCategoryPropertyLocalService;
188     }
189 
190     public void setAssetCategoryPropertyLocalService(
191         AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
192         this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
193     }
194 
195     public AssetCategoryPropertyService getAssetCategoryPropertyService() {
196         return assetCategoryPropertyService;
197     }
198 
199     public void setAssetCategoryPropertyService(
200         AssetCategoryPropertyService assetCategoryPropertyService) {
201         this.assetCategoryPropertyService = assetCategoryPropertyService;
202     }
203 
204     public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
205         return assetCategoryPropertyPersistence;
206     }
207 
208     public void setAssetCategoryPropertyPersistence(
209         AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
210         this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
211     }
212 
213     public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
214         return assetCategoryPropertyFinder;
215     }
216 
217     public void setAssetCategoryPropertyFinder(
218         AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
219         this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
220     }
221 
222     public AssetEntryLocalService getAssetEntryLocalService() {
223         return assetEntryLocalService;
224     }
225 
226     public void setAssetEntryLocalService(
227         AssetEntryLocalService assetEntryLocalService) {
228         this.assetEntryLocalService = assetEntryLocalService;
229     }
230 
231     public AssetEntryService getAssetEntryService() {
232         return assetEntryService;
233     }
234 
235     public void setAssetEntryService(AssetEntryService assetEntryService) {
236         this.assetEntryService = assetEntryService;
237     }
238 
239     public AssetEntryPersistence getAssetEntryPersistence() {
240         return assetEntryPersistence;
241     }
242 
243     public void setAssetEntryPersistence(
244         AssetEntryPersistence assetEntryPersistence) {
245         this.assetEntryPersistence = assetEntryPersistence;
246     }
247 
248     public AssetEntryFinder getAssetEntryFinder() {
249         return assetEntryFinder;
250     }
251 
252     public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
253         this.assetEntryFinder = assetEntryFinder;
254     }
255 
256     public AssetLinkLocalService getAssetLinkLocalService() {
257         return assetLinkLocalService;
258     }
259 
260     public void setAssetLinkLocalService(
261         AssetLinkLocalService assetLinkLocalService) {
262         this.assetLinkLocalService = assetLinkLocalService;
263     }
264 
265     public AssetLinkPersistence getAssetLinkPersistence() {
266         return assetLinkPersistence;
267     }
268 
269     public void setAssetLinkPersistence(
270         AssetLinkPersistence assetLinkPersistence) {
271         this.assetLinkPersistence = assetLinkPersistence;
272     }
273 
274     public AssetTagLocalService getAssetTagLocalService() {
275         return assetTagLocalService;
276     }
277 
278     public void setAssetTagLocalService(
279         AssetTagLocalService assetTagLocalService) {
280         this.assetTagLocalService = assetTagLocalService;
281     }
282 
283     public AssetTagService getAssetTagService() {
284         return assetTagService;
285     }
286 
287     public void setAssetTagService(AssetTagService assetTagService) {
288         this.assetTagService = assetTagService;
289     }
290 
291     public AssetTagPersistence getAssetTagPersistence() {
292         return assetTagPersistence;
293     }
294 
295     public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
296         this.assetTagPersistence = assetTagPersistence;
297     }
298 
299     public AssetTagFinder getAssetTagFinder() {
300         return assetTagFinder;
301     }
302 
303     public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
304         this.assetTagFinder = assetTagFinder;
305     }
306 
307     public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
308         return assetTagPropertyLocalService;
309     }
310 
311     public void setAssetTagPropertyLocalService(
312         AssetTagPropertyLocalService assetTagPropertyLocalService) {
313         this.assetTagPropertyLocalService = assetTagPropertyLocalService;
314     }
315 
316     public AssetTagPropertyService getAssetTagPropertyService() {
317         return assetTagPropertyService;
318     }
319 
320     public void setAssetTagPropertyService(
321         AssetTagPropertyService assetTagPropertyService) {
322         this.assetTagPropertyService = assetTagPropertyService;
323     }
324 
325     public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
326         return assetTagPropertyPersistence;
327     }
328 
329     public void setAssetTagPropertyPersistence(
330         AssetTagPropertyPersistence assetTagPropertyPersistence) {
331         this.assetTagPropertyPersistence = assetTagPropertyPersistence;
332     }
333 
334     public AssetTagPropertyFinder getAssetTagPropertyFinder() {
335         return assetTagPropertyFinder;
336     }
337 
338     public void setAssetTagPropertyFinder(
339         AssetTagPropertyFinder assetTagPropertyFinder) {
340         this.assetTagPropertyFinder = assetTagPropertyFinder;
341     }
342 
343     public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
344         return assetTagPropertyKeyFinder;
345     }
346 
347     public void setAssetTagPropertyKeyFinder(
348         AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
349         this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
350     }
351 
352     public AssetTagStatsLocalService getAssetTagStatsLocalService() {
353         return assetTagStatsLocalService;
354     }
355 
356     public void setAssetTagStatsLocalService(
357         AssetTagStatsLocalService assetTagStatsLocalService) {
358         this.assetTagStatsLocalService = assetTagStatsLocalService;
359     }
360 
361     public AssetTagStatsPersistence getAssetTagStatsPersistence() {
362         return assetTagStatsPersistence;
363     }
364 
365     public void setAssetTagStatsPersistence(
366         AssetTagStatsPersistence assetTagStatsPersistence) {
367         this.assetTagStatsPersistence = assetTagStatsPersistence;
368     }
369 
370     public AssetVocabularyLocalService getAssetVocabularyLocalService() {
371         return assetVocabularyLocalService;
372     }
373 
374     public void setAssetVocabularyLocalService(
375         AssetVocabularyLocalService assetVocabularyLocalService) {
376         this.assetVocabularyLocalService = assetVocabularyLocalService;
377     }
378 
379     public AssetVocabularyService getAssetVocabularyService() {
380         return assetVocabularyService;
381     }
382 
383     public void setAssetVocabularyService(
384         AssetVocabularyService assetVocabularyService) {
385         this.assetVocabularyService = assetVocabularyService;
386     }
387 
388     public AssetVocabularyPersistence getAssetVocabularyPersistence() {
389         return assetVocabularyPersistence;
390     }
391 
392     public void setAssetVocabularyPersistence(
393         AssetVocabularyPersistence assetVocabularyPersistence) {
394         this.assetVocabularyPersistence = assetVocabularyPersistence;
395     }
396 
397     public CounterLocalService getCounterLocalService() {
398         return counterLocalService;
399     }
400 
401     public void setCounterLocalService(CounterLocalService counterLocalService) {
402         this.counterLocalService = counterLocalService;
403     }
404 
405     public ResourceLocalService getResourceLocalService() {
406         return resourceLocalService;
407     }
408 
409     public void setResourceLocalService(
410         ResourceLocalService resourceLocalService) {
411         this.resourceLocalService = resourceLocalService;
412     }
413 
414     public ResourceService getResourceService() {
415         return resourceService;
416     }
417 
418     public void setResourceService(ResourceService resourceService) {
419         this.resourceService = resourceService;
420     }
421 
422     public ResourcePersistence getResourcePersistence() {
423         return resourcePersistence;
424     }
425 
426     public void setResourcePersistence(ResourcePersistence resourcePersistence) {
427         this.resourcePersistence = resourcePersistence;
428     }
429 
430     public ResourceFinder getResourceFinder() {
431         return resourceFinder;
432     }
433 
434     public void setResourceFinder(ResourceFinder resourceFinder) {
435         this.resourceFinder = resourceFinder;
436     }
437 
438     public UserLocalService getUserLocalService() {
439         return userLocalService;
440     }
441 
442     public void setUserLocalService(UserLocalService userLocalService) {
443         this.userLocalService = userLocalService;
444     }
445 
446     public UserService getUserService() {
447         return userService;
448     }
449 
450     public void setUserService(UserService userService) {
451         this.userService = userService;
452     }
453 
454     public UserPersistence getUserPersistence() {
455         return userPersistence;
456     }
457 
458     public void setUserPersistence(UserPersistence userPersistence) {
459         this.userPersistence = userPersistence;
460     }
461 
462     public UserFinder getUserFinder() {
463         return userFinder;
464     }
465 
466     public void setUserFinder(UserFinder userFinder) {
467         this.userFinder = userFinder;
468     }
469 
470     protected void runSQL(String sql) throws SystemException {
471         try {
472             DB db = DBFactoryUtil.getDB();
473 
474             db.runSQL(sql);
475         }
476         catch (Exception e) {
477             throw new SystemException(e);
478         }
479     }
480 
481     @BeanReference(type = AssetCategoryLocalService.class)
482     protected AssetCategoryLocalService assetCategoryLocalService;
483     @BeanReference(type = AssetCategoryService.class)
484     protected AssetCategoryService assetCategoryService;
485     @BeanReference(type = AssetCategoryPersistence.class)
486     protected AssetCategoryPersistence assetCategoryPersistence;
487     @BeanReference(type = AssetCategoryFinder.class)
488     protected AssetCategoryFinder assetCategoryFinder;
489     @BeanReference(type = AssetCategoryPropertyLocalService.class)
490     protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
491     @BeanReference(type = AssetCategoryPropertyService.class)
492     protected AssetCategoryPropertyService assetCategoryPropertyService;
493     @BeanReference(type = AssetCategoryPropertyPersistence.class)
494     protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
495     @BeanReference(type = AssetCategoryPropertyFinder.class)
496     protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
497     @BeanReference(type = AssetEntryLocalService.class)
498     protected AssetEntryLocalService assetEntryLocalService;
499     @BeanReference(type = AssetEntryService.class)
500     protected AssetEntryService assetEntryService;
501     @BeanReference(type = AssetEntryPersistence.class)
502     protected AssetEntryPersistence assetEntryPersistence;
503     @BeanReference(type = AssetEntryFinder.class)
504     protected AssetEntryFinder assetEntryFinder;
505     @BeanReference(type = AssetLinkLocalService.class)
506     protected AssetLinkLocalService assetLinkLocalService;
507     @BeanReference(type = AssetLinkPersistence.class)
508     protected AssetLinkPersistence assetLinkPersistence;
509     @BeanReference(type = AssetTagLocalService.class)
510     protected AssetTagLocalService assetTagLocalService;
511     @BeanReference(type = AssetTagService.class)
512     protected AssetTagService assetTagService;
513     @BeanReference(type = AssetTagPersistence.class)
514     protected AssetTagPersistence assetTagPersistence;
515     @BeanReference(type = AssetTagFinder.class)
516     protected AssetTagFinder assetTagFinder;
517     @BeanReference(type = AssetTagPropertyLocalService.class)
518     protected AssetTagPropertyLocalService assetTagPropertyLocalService;
519     @BeanReference(type = AssetTagPropertyService.class)
520     protected AssetTagPropertyService assetTagPropertyService;
521     @BeanReference(type = AssetTagPropertyPersistence.class)
522     protected AssetTagPropertyPersistence assetTagPropertyPersistence;
523     @BeanReference(type = AssetTagPropertyFinder.class)
524     protected AssetTagPropertyFinder assetTagPropertyFinder;
525     @BeanReference(type = AssetTagPropertyKeyFinder.class)
526     protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
527     @BeanReference(type = AssetTagStatsLocalService.class)
528     protected AssetTagStatsLocalService assetTagStatsLocalService;
529     @BeanReference(type = AssetTagStatsPersistence.class)
530     protected AssetTagStatsPersistence assetTagStatsPersistence;
531     @BeanReference(type = AssetVocabularyLocalService.class)
532     protected AssetVocabularyLocalService assetVocabularyLocalService;
533     @BeanReference(type = AssetVocabularyService.class)
534     protected AssetVocabularyService assetVocabularyService;
535     @BeanReference(type = AssetVocabularyPersistence.class)
536     protected AssetVocabularyPersistence assetVocabularyPersistence;
537     @BeanReference(type = CounterLocalService.class)
538     protected CounterLocalService counterLocalService;
539     @BeanReference(type = ResourceLocalService.class)
540     protected ResourceLocalService resourceLocalService;
541     @BeanReference(type = ResourceService.class)
542     protected ResourceService resourceService;
543     @BeanReference(type = ResourcePersistence.class)
544     protected ResourcePersistence resourcePersistence;
545     @BeanReference(type = ResourceFinder.class)
546     protected ResourceFinder resourceFinder;
547     @BeanReference(type = UserLocalService.class)
548     protected UserLocalService userLocalService;
549     @BeanReference(type = UserService.class)
550     protected UserService userService;
551     @BeanReference(type = UserPersistence.class)
552     protected UserPersistence userPersistence;
553     @BeanReference(type = UserFinder.class)
554     protected UserFinder userFinder;
555 }