001
014
015 package com.liferay.portlet.asset.service.base;
016
017 import com.liferay.counter.service.CounterLocalService;
018
019 import com.liferay.portal.kernel.annotation.BeanReference;
020 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023 import com.liferay.portal.kernel.exception.PortalException;
024 import com.liferay.portal.kernel.exception.SystemException;
025 import com.liferay.portal.kernel.util.OrderByComparator;
026 import com.liferay.portal.service.ResourceLocalService;
027 import com.liferay.portal.service.ResourceService;
028 import com.liferay.portal.service.UserLocalService;
029 import com.liferay.portal.service.UserService;
030 import com.liferay.portal.service.persistence.ResourceFinder;
031 import com.liferay.portal.service.persistence.ResourcePersistence;
032 import com.liferay.portal.service.persistence.UserFinder;
033 import com.liferay.portal.service.persistence.UserPersistence;
034
035 import com.liferay.portlet.asset.model.AssetCategory;
036 import com.liferay.portlet.asset.service.AssetCategoryLocalService;
037 import com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService;
038 import com.liferay.portlet.asset.service.AssetCategoryPropertyService;
039 import com.liferay.portlet.asset.service.AssetCategoryService;
040 import com.liferay.portlet.asset.service.AssetEntryLocalService;
041 import com.liferay.portlet.asset.service.AssetEntryService;
042 import com.liferay.portlet.asset.service.AssetLinkLocalService;
043 import com.liferay.portlet.asset.service.AssetTagLocalService;
044 import com.liferay.portlet.asset.service.AssetTagPropertyLocalService;
045 import com.liferay.portlet.asset.service.AssetTagPropertyService;
046 import com.liferay.portlet.asset.service.AssetTagService;
047 import com.liferay.portlet.asset.service.AssetTagStatsLocalService;
048 import com.liferay.portlet.asset.service.AssetVocabularyLocalService;
049 import com.liferay.portlet.asset.service.AssetVocabularyService;
050 import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
051 import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
052 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyFinder;
053 import com.liferay.portlet.asset.service.persistence.AssetCategoryPropertyPersistence;
054 import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
055 import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
056 import com.liferay.portlet.asset.service.persistence.AssetLinkPersistence;
057 import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
058 import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
059 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyFinder;
060 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyKeyFinder;
061 import com.liferay.portlet.asset.service.persistence.AssetTagPropertyPersistence;
062 import com.liferay.portlet.asset.service.persistence.AssetTagStatsPersistence;
063 import com.liferay.portlet.asset.service.persistence.AssetVocabularyPersistence;
064
065 import java.util.List;
066
067 import javax.sql.DataSource;
068
069
072 public abstract class AssetCategoryLocalServiceBaseImpl
073 implements AssetCategoryLocalService {
074 public AssetCategory addAssetCategory(AssetCategory assetCategory)
075 throws SystemException {
076 assetCategory.setNew(true);
077
078 return assetCategoryPersistence.update(assetCategory, false);
079 }
080
081 public AssetCategory createAssetCategory(long categoryId) {
082 return assetCategoryPersistence.create(categoryId);
083 }
084
085 public void deleteAssetCategory(long categoryId)
086 throws PortalException, SystemException {
087 assetCategoryPersistence.remove(categoryId);
088 }
089
090 public void deleteAssetCategory(AssetCategory assetCategory)
091 throws SystemException {
092 assetCategoryPersistence.remove(assetCategory);
093 }
094
095 @SuppressWarnings("unchecked")
096 public List dynamicQuery(DynamicQuery dynamicQuery)
097 throws SystemException {
098 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery);
099 }
100
101 @SuppressWarnings("unchecked")
102 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
103 throws SystemException {
104 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
105 start, end);
106 }
107
108 @SuppressWarnings("unchecked")
109 public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
110 OrderByComparator orderByComparator) throws SystemException {
111 return assetCategoryPersistence.findWithDynamicQuery(dynamicQuery,
112 start, end, orderByComparator);
113 }
114
115 public long dynamicQueryCount(DynamicQuery dynamicQuery)
116 throws SystemException {
117 return assetCategoryPersistence.countWithDynamicQuery(dynamicQuery);
118 }
119
120 public AssetCategory getAssetCategory(long categoryId)
121 throws PortalException, SystemException {
122 return assetCategoryPersistence.findByPrimaryKey(categoryId);
123 }
124
125 public AssetCategory getAssetCategoryByUuidAndGroupId(String uuid,
126 long groupId) throws PortalException, SystemException {
127 return assetCategoryPersistence.findByUUID_G(uuid, groupId);
128 }
129
130 public List<AssetCategory> getAssetCategories(int start, int end)
131 throws SystemException {
132 return assetCategoryPersistence.findAll(start, end);
133 }
134
135 public int getAssetCategoriesCount() throws SystemException {
136 return assetCategoryPersistence.countAll();
137 }
138
139 public AssetCategory updateAssetCategory(AssetCategory assetCategory)
140 throws SystemException {
141 assetCategory.setNew(false);
142
143 return assetCategoryPersistence.update(assetCategory, true);
144 }
145
146 public AssetCategory updateAssetCategory(AssetCategory assetCategory,
147 boolean merge) throws SystemException {
148 assetCategory.setNew(false);
149
150 return assetCategoryPersistence.update(assetCategory, merge);
151 }
152
153 public AssetCategoryLocalService getAssetCategoryLocalService() {
154 return assetCategoryLocalService;
155 }
156
157 public void setAssetCategoryLocalService(
158 AssetCategoryLocalService assetCategoryLocalService) {
159 this.assetCategoryLocalService = assetCategoryLocalService;
160 }
161
162 public AssetCategoryService getAssetCategoryService() {
163 return assetCategoryService;
164 }
165
166 public void setAssetCategoryService(
167 AssetCategoryService assetCategoryService) {
168 this.assetCategoryService = assetCategoryService;
169 }
170
171 public AssetCategoryPersistence getAssetCategoryPersistence() {
172 return assetCategoryPersistence;
173 }
174
175 public void setAssetCategoryPersistence(
176 AssetCategoryPersistence assetCategoryPersistence) {
177 this.assetCategoryPersistence = assetCategoryPersistence;
178 }
179
180 public AssetCategoryFinder getAssetCategoryFinder() {
181 return assetCategoryFinder;
182 }
183
184 public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
185 this.assetCategoryFinder = assetCategoryFinder;
186 }
187
188 public AssetCategoryPropertyLocalService getAssetCategoryPropertyLocalService() {
189 return assetCategoryPropertyLocalService;
190 }
191
192 public void setAssetCategoryPropertyLocalService(
193 AssetCategoryPropertyLocalService assetCategoryPropertyLocalService) {
194 this.assetCategoryPropertyLocalService = assetCategoryPropertyLocalService;
195 }
196
197 public AssetCategoryPropertyService getAssetCategoryPropertyService() {
198 return assetCategoryPropertyService;
199 }
200
201 public void setAssetCategoryPropertyService(
202 AssetCategoryPropertyService assetCategoryPropertyService) {
203 this.assetCategoryPropertyService = assetCategoryPropertyService;
204 }
205
206 public AssetCategoryPropertyPersistence getAssetCategoryPropertyPersistence() {
207 return assetCategoryPropertyPersistence;
208 }
209
210 public void setAssetCategoryPropertyPersistence(
211 AssetCategoryPropertyPersistence assetCategoryPropertyPersistence) {
212 this.assetCategoryPropertyPersistence = assetCategoryPropertyPersistence;
213 }
214
215 public AssetCategoryPropertyFinder getAssetCategoryPropertyFinder() {
216 return assetCategoryPropertyFinder;
217 }
218
219 public void setAssetCategoryPropertyFinder(
220 AssetCategoryPropertyFinder assetCategoryPropertyFinder) {
221 this.assetCategoryPropertyFinder = assetCategoryPropertyFinder;
222 }
223
224 public AssetEntryLocalService getAssetEntryLocalService() {
225 return assetEntryLocalService;
226 }
227
228 public void setAssetEntryLocalService(
229 AssetEntryLocalService assetEntryLocalService) {
230 this.assetEntryLocalService = assetEntryLocalService;
231 }
232
233 public AssetEntryService getAssetEntryService() {
234 return assetEntryService;
235 }
236
237 public void setAssetEntryService(AssetEntryService assetEntryService) {
238 this.assetEntryService = assetEntryService;
239 }
240
241 public AssetEntryPersistence getAssetEntryPersistence() {
242 return assetEntryPersistence;
243 }
244
245 public void setAssetEntryPersistence(
246 AssetEntryPersistence assetEntryPersistence) {
247 this.assetEntryPersistence = assetEntryPersistence;
248 }
249
250 public AssetEntryFinder getAssetEntryFinder() {
251 return assetEntryFinder;
252 }
253
254 public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
255 this.assetEntryFinder = assetEntryFinder;
256 }
257
258 public AssetLinkLocalService getAssetLinkLocalService() {
259 return assetLinkLocalService;
260 }
261
262 public void setAssetLinkLocalService(
263 AssetLinkLocalService assetLinkLocalService) {
264 this.assetLinkLocalService = assetLinkLocalService;
265 }
266
267 public AssetLinkPersistence getAssetLinkPersistence() {
268 return assetLinkPersistence;
269 }
270
271 public void setAssetLinkPersistence(
272 AssetLinkPersistence assetLinkPersistence) {
273 this.assetLinkPersistence = assetLinkPersistence;
274 }
275
276 public AssetTagLocalService getAssetTagLocalService() {
277 return assetTagLocalService;
278 }
279
280 public void setAssetTagLocalService(
281 AssetTagLocalService assetTagLocalService) {
282 this.assetTagLocalService = assetTagLocalService;
283 }
284
285 public AssetTagService getAssetTagService() {
286 return assetTagService;
287 }
288
289 public void setAssetTagService(AssetTagService assetTagService) {
290 this.assetTagService = assetTagService;
291 }
292
293 public AssetTagPersistence getAssetTagPersistence() {
294 return assetTagPersistence;
295 }
296
297 public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
298 this.assetTagPersistence = assetTagPersistence;
299 }
300
301 public AssetTagFinder getAssetTagFinder() {
302 return assetTagFinder;
303 }
304
305 public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
306 this.assetTagFinder = assetTagFinder;
307 }
308
309 public AssetTagPropertyLocalService getAssetTagPropertyLocalService() {
310 return assetTagPropertyLocalService;
311 }
312
313 public void setAssetTagPropertyLocalService(
314 AssetTagPropertyLocalService assetTagPropertyLocalService) {
315 this.assetTagPropertyLocalService = assetTagPropertyLocalService;
316 }
317
318 public AssetTagPropertyService getAssetTagPropertyService() {
319 return assetTagPropertyService;
320 }
321
322 public void setAssetTagPropertyService(
323 AssetTagPropertyService assetTagPropertyService) {
324 this.assetTagPropertyService = assetTagPropertyService;
325 }
326
327 public AssetTagPropertyPersistence getAssetTagPropertyPersistence() {
328 return assetTagPropertyPersistence;
329 }
330
331 public void setAssetTagPropertyPersistence(
332 AssetTagPropertyPersistence assetTagPropertyPersistence) {
333 this.assetTagPropertyPersistence = assetTagPropertyPersistence;
334 }
335
336 public AssetTagPropertyFinder getAssetTagPropertyFinder() {
337 return assetTagPropertyFinder;
338 }
339
340 public void setAssetTagPropertyFinder(
341 AssetTagPropertyFinder assetTagPropertyFinder) {
342 this.assetTagPropertyFinder = assetTagPropertyFinder;
343 }
344
345 public AssetTagPropertyKeyFinder getAssetTagPropertyKeyFinder() {
346 return assetTagPropertyKeyFinder;
347 }
348
349 public void setAssetTagPropertyKeyFinder(
350 AssetTagPropertyKeyFinder assetTagPropertyKeyFinder) {
351 this.assetTagPropertyKeyFinder = assetTagPropertyKeyFinder;
352 }
353
354 public AssetTagStatsLocalService getAssetTagStatsLocalService() {
355 return assetTagStatsLocalService;
356 }
357
358 public void setAssetTagStatsLocalService(
359 AssetTagStatsLocalService assetTagStatsLocalService) {
360 this.assetTagStatsLocalService = assetTagStatsLocalService;
361 }
362
363 public AssetTagStatsPersistence getAssetTagStatsPersistence() {
364 return assetTagStatsPersistence;
365 }
366
367 public void setAssetTagStatsPersistence(
368 AssetTagStatsPersistence assetTagStatsPersistence) {
369 this.assetTagStatsPersistence = assetTagStatsPersistence;
370 }
371
372 public AssetVocabularyLocalService getAssetVocabularyLocalService() {
373 return assetVocabularyLocalService;
374 }
375
376 public void setAssetVocabularyLocalService(
377 AssetVocabularyLocalService assetVocabularyLocalService) {
378 this.assetVocabularyLocalService = assetVocabularyLocalService;
379 }
380
381 public AssetVocabularyService getAssetVocabularyService() {
382 return assetVocabularyService;
383 }
384
385 public void setAssetVocabularyService(
386 AssetVocabularyService assetVocabularyService) {
387 this.assetVocabularyService = assetVocabularyService;
388 }
389
390 public AssetVocabularyPersistence getAssetVocabularyPersistence() {
391 return assetVocabularyPersistence;
392 }
393
394 public void setAssetVocabularyPersistence(
395 AssetVocabularyPersistence assetVocabularyPersistence) {
396 this.assetVocabularyPersistence = assetVocabularyPersistence;
397 }
398
399 public CounterLocalService getCounterLocalService() {
400 return counterLocalService;
401 }
402
403 public void setCounterLocalService(CounterLocalService counterLocalService) {
404 this.counterLocalService = counterLocalService;
405 }
406
407 public ResourceLocalService getResourceLocalService() {
408 return resourceLocalService;
409 }
410
411 public void setResourceLocalService(
412 ResourceLocalService resourceLocalService) {
413 this.resourceLocalService = resourceLocalService;
414 }
415
416 public ResourceService getResourceService() {
417 return resourceService;
418 }
419
420 public void setResourceService(ResourceService resourceService) {
421 this.resourceService = resourceService;
422 }
423
424 public ResourcePersistence getResourcePersistence() {
425 return resourcePersistence;
426 }
427
428 public void setResourcePersistence(ResourcePersistence resourcePersistence) {
429 this.resourcePersistence = resourcePersistence;
430 }
431
432 public ResourceFinder getResourceFinder() {
433 return resourceFinder;
434 }
435
436 public void setResourceFinder(ResourceFinder resourceFinder) {
437 this.resourceFinder = resourceFinder;
438 }
439
440 public UserLocalService getUserLocalService() {
441 return userLocalService;
442 }
443
444 public void setUserLocalService(UserLocalService userLocalService) {
445 this.userLocalService = userLocalService;
446 }
447
448 public UserService getUserService() {
449 return userService;
450 }
451
452 public void setUserService(UserService userService) {
453 this.userService = userService;
454 }
455
456 public UserPersistence getUserPersistence() {
457 return userPersistence;
458 }
459
460 public void setUserPersistence(UserPersistence userPersistence) {
461 this.userPersistence = userPersistence;
462 }
463
464 public UserFinder getUserFinder() {
465 return userFinder;
466 }
467
468 public void setUserFinder(UserFinder userFinder) {
469 this.userFinder = userFinder;
470 }
471
472 protected void runSQL(String sql) throws SystemException {
473 try {
474 DataSource dataSource = assetCategoryPersistence.getDataSource();
475
476 SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
477 sql, new int[0]);
478
479 sqlUpdate.update();
480 }
481 catch (Exception e) {
482 throw new SystemException(e);
483 }
484 }
485
486 @BeanReference(type = AssetCategoryLocalService.class)
487 protected AssetCategoryLocalService assetCategoryLocalService;
488 @BeanReference(type = AssetCategoryService.class)
489 protected AssetCategoryService assetCategoryService;
490 @BeanReference(type = AssetCategoryPersistence.class)
491 protected AssetCategoryPersistence assetCategoryPersistence;
492 @BeanReference(type = AssetCategoryFinder.class)
493 protected AssetCategoryFinder assetCategoryFinder;
494 @BeanReference(type = AssetCategoryPropertyLocalService.class)
495 protected AssetCategoryPropertyLocalService assetCategoryPropertyLocalService;
496 @BeanReference(type = AssetCategoryPropertyService.class)
497 protected AssetCategoryPropertyService assetCategoryPropertyService;
498 @BeanReference(type = AssetCategoryPropertyPersistence.class)
499 protected AssetCategoryPropertyPersistence assetCategoryPropertyPersistence;
500 @BeanReference(type = AssetCategoryPropertyFinder.class)
501 protected AssetCategoryPropertyFinder assetCategoryPropertyFinder;
502 @BeanReference(type = AssetEntryLocalService.class)
503 protected AssetEntryLocalService assetEntryLocalService;
504 @BeanReference(type = AssetEntryService.class)
505 protected AssetEntryService assetEntryService;
506 @BeanReference(type = AssetEntryPersistence.class)
507 protected AssetEntryPersistence assetEntryPersistence;
508 @BeanReference(type = AssetEntryFinder.class)
509 protected AssetEntryFinder assetEntryFinder;
510 @BeanReference(type = AssetLinkLocalService.class)
511 protected AssetLinkLocalService assetLinkLocalService;
512 @BeanReference(type = AssetLinkPersistence.class)
513 protected AssetLinkPersistence assetLinkPersistence;
514 @BeanReference(type = AssetTagLocalService.class)
515 protected AssetTagLocalService assetTagLocalService;
516 @BeanReference(type = AssetTagService.class)
517 protected AssetTagService assetTagService;
518 @BeanReference(type = AssetTagPersistence.class)
519 protected AssetTagPersistence assetTagPersistence;
520 @BeanReference(type = AssetTagFinder.class)
521 protected AssetTagFinder assetTagFinder;
522 @BeanReference(type = AssetTagPropertyLocalService.class)
523 protected AssetTagPropertyLocalService assetTagPropertyLocalService;
524 @BeanReference(type = AssetTagPropertyService.class)
525 protected AssetTagPropertyService assetTagPropertyService;
526 @BeanReference(type = AssetTagPropertyPersistence.class)
527 protected AssetTagPropertyPersistence assetTagPropertyPersistence;
528 @BeanReference(type = AssetTagPropertyFinder.class)
529 protected AssetTagPropertyFinder assetTagPropertyFinder;
530 @BeanReference(type = AssetTagPropertyKeyFinder.class)
531 protected AssetTagPropertyKeyFinder assetTagPropertyKeyFinder;
532 @BeanReference(type = AssetTagStatsLocalService.class)
533 protected AssetTagStatsLocalService assetTagStatsLocalService;
534 @BeanReference(type = AssetTagStatsPersistence.class)
535 protected AssetTagStatsPersistence assetTagStatsPersistence;
536 @BeanReference(type = AssetVocabularyLocalService.class)
537 protected AssetVocabularyLocalService assetVocabularyLocalService;
538 @BeanReference(type = AssetVocabularyService.class)
539 protected AssetVocabularyService assetVocabularyService;
540 @BeanReference(type = AssetVocabularyPersistence.class)
541 protected AssetVocabularyPersistence assetVocabularyPersistence;
542 @BeanReference(type = CounterLocalService.class)
543 protected CounterLocalService counterLocalService;
544 @BeanReference(type = ResourceLocalService.class)
545 protected ResourceLocalService resourceLocalService;
546 @BeanReference(type = ResourceService.class)
547 protected ResourceService resourceService;
548 @BeanReference(type = ResourcePersistence.class)
549 protected ResourcePersistence resourcePersistence;
550 @BeanReference(type = ResourceFinder.class)
551 protected ResourceFinder resourceFinder;
552 @BeanReference(type = UserLocalService.class)
553 protected UserLocalService userLocalService;
554 @BeanReference(type = UserService.class)
555 protected UserService userService;
556 @BeanReference(type = UserPersistence.class)
557 protected UserPersistence userPersistence;
558 @BeanReference(type = UserFinder.class)
559 protected UserFinder userFinder;
560 }