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