001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.softwarecatalog.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.db.DB;
022    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
024    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
025    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
028    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.search.Indexable;
033    import com.liferay.portal.kernel.search.IndexableType;
034    import com.liferay.portal.kernel.util.OrderByComparator;
035    import com.liferay.portal.model.PersistedModel;
036    import com.liferay.portal.service.BaseLocalServiceImpl;
037    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
038    import com.liferay.portal.service.persistence.GroupFinder;
039    import com.liferay.portal.service.persistence.GroupPersistence;
040    import com.liferay.portal.service.persistence.ImagePersistence;
041    import com.liferay.portal.service.persistence.SubscriptionPersistence;
042    import com.liferay.portal.service.persistence.UserFinder;
043    import com.liferay.portal.service.persistence.UserPersistence;
044    import com.liferay.portal.util.PortalUtil;
045    
046    import com.liferay.portlet.messageboards.service.persistence.MBMessageFinder;
047    import com.liferay.portlet.messageboards.service.persistence.MBMessagePersistence;
048    import com.liferay.portlet.ratings.service.persistence.RatingsStatsFinder;
049    import com.liferay.portlet.ratings.service.persistence.RatingsStatsPersistence;
050    import com.liferay.portlet.softwarecatalog.model.SCProductEntry;
051    import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
052    import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
053    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
054    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
055    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
056    
057    import java.io.Serializable;
058    
059    import java.util.List;
060    
061    import javax.sql.DataSource;
062    
063    /**
064     * Provides the base implementation for the s c product entry local service.
065     *
066     * <p>
067     * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl}.
068     * </p>
069     *
070     * @author Brian Wing Shun Chan
071     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl
072     * @see com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceUtil
073     * @generated
074     */
075    @ProviderType
076    public abstract class SCProductEntryLocalServiceBaseImpl
077            extends BaseLocalServiceImpl implements SCProductEntryLocalService,
078                    IdentifiableBean {
079            /*
080             * NOTE FOR DEVELOPERS:
081             *
082             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceUtil} to access the s c product entry local service.
083             */
084    
085            /**
086             * Adds the s c product entry to the database. Also notifies the appropriate model listeners.
087             *
088             * @param scProductEntry the s c product entry
089             * @return the s c product entry that was added
090             */
091            @Indexable(type = IndexableType.REINDEX)
092            @Override
093            public SCProductEntry addSCProductEntry(SCProductEntry scProductEntry) {
094                    scProductEntry.setNew(true);
095    
096                    return scProductEntryPersistence.update(scProductEntry);
097            }
098    
099            /**
100             * Creates a new s c product entry with the primary key. Does not add the s c product entry to the database.
101             *
102             * @param productEntryId the primary key for the new s c product entry
103             * @return the new s c product entry
104             */
105            @Override
106            public SCProductEntry createSCProductEntry(long productEntryId) {
107                    return scProductEntryPersistence.create(productEntryId);
108            }
109    
110            /**
111             * Deletes the s c product entry with the primary key from the database. Also notifies the appropriate model listeners.
112             *
113             * @param productEntryId the primary key of the s c product entry
114             * @return the s c product entry that was removed
115             * @throws PortalException if a s c product entry with the primary key could not be found
116             */
117            @Indexable(type = IndexableType.DELETE)
118            @Override
119            public SCProductEntry deleteSCProductEntry(long productEntryId)
120                    throws PortalException {
121                    return scProductEntryPersistence.remove(productEntryId);
122            }
123    
124            /**
125             * Deletes the s c product entry from the database. Also notifies the appropriate model listeners.
126             *
127             * @param scProductEntry the s c product entry
128             * @return the s c product entry that was removed
129             */
130            @Indexable(type = IndexableType.DELETE)
131            @Override
132            public SCProductEntry deleteSCProductEntry(SCProductEntry scProductEntry) {
133                    return scProductEntryPersistence.remove(scProductEntry);
134            }
135    
136            @Override
137            public DynamicQuery dynamicQuery() {
138                    Class<?> clazz = getClass();
139    
140                    return DynamicQueryFactoryUtil.forClass(SCProductEntry.class,
141                            clazz.getClassLoader());
142            }
143    
144            /**
145             * Performs a dynamic query on the database and returns the matching rows.
146             *
147             * @param dynamicQuery the dynamic query
148             * @return the matching rows
149             */
150            @Override
151            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
152                    return scProductEntryPersistence.findWithDynamicQuery(dynamicQuery);
153            }
154    
155            /**
156             * Performs a dynamic query on the database and returns a range of the matching rows.
157             *
158             * <p>
159             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
160             * </p>
161             *
162             * @param dynamicQuery the dynamic query
163             * @param start the lower bound of the range of model instances
164             * @param end the upper bound of the range of model instances (not inclusive)
165             * @return the range of matching rows
166             */
167            @Override
168            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
169                    int end) {
170                    return scProductEntryPersistence.findWithDynamicQuery(dynamicQuery,
171                            start, end);
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
176             *
177             * <p>
178             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
179             * </p>
180             *
181             * @param dynamicQuery the dynamic query
182             * @param start the lower bound of the range of model instances
183             * @param end the upper bound of the range of model instances (not inclusive)
184             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
185             * @return the ordered range of matching rows
186             */
187            @Override
188            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
189                    int end, OrderByComparator<T> orderByComparator) {
190                    return scProductEntryPersistence.findWithDynamicQuery(dynamicQuery,
191                            start, end, orderByComparator);
192            }
193    
194            /**
195             * Returns the number of rows matching the dynamic query.
196             *
197             * @param dynamicQuery the dynamic query
198             * @return the number of rows matching the dynamic query
199             */
200            @Override
201            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
202                    return scProductEntryPersistence.countWithDynamicQuery(dynamicQuery);
203            }
204    
205            /**
206             * Returns the number of rows matching the dynamic query.
207             *
208             * @param dynamicQuery the dynamic query
209             * @param projection the projection to apply to the query
210             * @return the number of rows matching the dynamic query
211             */
212            @Override
213            public long dynamicQueryCount(DynamicQuery dynamicQuery,
214                    Projection projection) {
215                    return scProductEntryPersistence.countWithDynamicQuery(dynamicQuery,
216                            projection);
217            }
218    
219            @Override
220            public SCProductEntry fetchSCProductEntry(long productEntryId) {
221                    return scProductEntryPersistence.fetchByPrimaryKey(productEntryId);
222            }
223    
224            /**
225             * Returns the s c product entry with the primary key.
226             *
227             * @param productEntryId the primary key of the s c product entry
228             * @return the s c product entry
229             * @throws PortalException if a s c product entry with the primary key could not be found
230             */
231            @Override
232            public SCProductEntry getSCProductEntry(long productEntryId)
233                    throws PortalException {
234                    return scProductEntryPersistence.findByPrimaryKey(productEntryId);
235            }
236    
237            @Override
238            public ActionableDynamicQuery getActionableDynamicQuery() {
239                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
240    
241                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceUtil.getService());
242                    actionableDynamicQuery.setClass(SCProductEntry.class);
243                    actionableDynamicQuery.setClassLoader(getClassLoader());
244    
245                    actionableDynamicQuery.setPrimaryKeyPropertyName("productEntryId");
246    
247                    return actionableDynamicQuery;
248            }
249    
250            protected void initActionableDynamicQuery(
251                    ActionableDynamicQuery actionableDynamicQuery) {
252                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalServiceUtil.getService());
253                    actionableDynamicQuery.setClass(SCProductEntry.class);
254                    actionableDynamicQuery.setClassLoader(getClassLoader());
255    
256                    actionableDynamicQuery.setPrimaryKeyPropertyName("productEntryId");
257            }
258    
259            /**
260             * @throws PortalException
261             */
262            @Override
263            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
264                    throws PortalException {
265                    return scProductEntryLocalService.deleteSCProductEntry((SCProductEntry)persistedModel);
266            }
267    
268            @Override
269            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
270                    throws PortalException {
271                    return scProductEntryPersistence.findByPrimaryKey(primaryKeyObj);
272            }
273    
274            /**
275             * Returns a range of all the s c product entries.
276             *
277             * <p>
278             * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.softwarecatalog.model.impl.SCProductEntryModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
279             * </p>
280             *
281             * @param start the lower bound of the range of s c product entries
282             * @param end the upper bound of the range of s c product entries (not inclusive)
283             * @return the range of s c product entries
284             */
285            @Override
286            public List<SCProductEntry> getSCProductEntries(int start, int end) {
287                    return scProductEntryPersistence.findAll(start, end);
288            }
289    
290            /**
291             * Returns the number of s c product entries.
292             *
293             * @return the number of s c product entries
294             */
295            @Override
296            public int getSCProductEntriesCount() {
297                    return scProductEntryPersistence.countAll();
298            }
299    
300            /**
301             * Updates the s c product entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
302             *
303             * @param scProductEntry the s c product entry
304             * @return the s c product entry that was updated
305             */
306            @Indexable(type = IndexableType.REINDEX)
307            @Override
308            public SCProductEntry updateSCProductEntry(SCProductEntry scProductEntry) {
309                    return scProductEntryPersistence.update(scProductEntry);
310            }
311    
312            /**
313             */
314            @Override
315            public void addSCLicenseSCProductEntry(long licenseId, long productEntryId) {
316                    scLicensePersistence.addSCProductEntry(licenseId, productEntryId);
317            }
318    
319            /**
320             */
321            @Override
322            public void addSCLicenseSCProductEntry(long licenseId,
323                    SCProductEntry scProductEntry) {
324                    scLicensePersistence.addSCProductEntry(licenseId, scProductEntry);
325            }
326    
327            /**
328             */
329            @Override
330            public void addSCLicenseSCProductEntries(long licenseId,
331                    long[] productEntryIds) {
332                    scLicensePersistence.addSCProductEntries(licenseId, productEntryIds);
333            }
334    
335            /**
336             */
337            @Override
338            public void addSCLicenseSCProductEntries(long licenseId,
339                    List<SCProductEntry> SCProductEntries) {
340                    scLicensePersistence.addSCProductEntries(licenseId, SCProductEntries);
341            }
342    
343            /**
344             */
345            @Override
346            public void clearSCLicenseSCProductEntries(long licenseId) {
347                    scLicensePersistence.clearSCProductEntries(licenseId);
348            }
349    
350            /**
351             */
352            @Override
353            public void deleteSCLicenseSCProductEntry(long licenseId,
354                    long productEntryId) {
355                    scLicensePersistence.removeSCProductEntry(licenseId, productEntryId);
356            }
357    
358            /**
359             */
360            @Override
361            public void deleteSCLicenseSCProductEntry(long licenseId,
362                    SCProductEntry scProductEntry) {
363                    scLicensePersistence.removeSCProductEntry(licenseId, scProductEntry);
364            }
365    
366            /**
367             */
368            @Override
369            public void deleteSCLicenseSCProductEntries(long licenseId,
370                    long[] productEntryIds) {
371                    scLicensePersistence.removeSCProductEntries(licenseId, productEntryIds);
372            }
373    
374            /**
375             */
376            @Override
377            public void deleteSCLicenseSCProductEntries(long licenseId,
378                    List<SCProductEntry> SCProductEntries) {
379                    scLicensePersistence.removeSCProductEntries(licenseId, SCProductEntries);
380            }
381    
382            /**
383             * Returns the licenseIds of the s c licenses associated with the s c product entry.
384             *
385             * @param productEntryId the productEntryId of the s c product entry
386             * @return long[] the licenseIds of s c licenses associated with the s c product entry
387             */
388            @Override
389            public long[] getSCLicensePrimaryKeys(long productEntryId) {
390                    return scProductEntryPersistence.getSCLicensePrimaryKeys(productEntryId);
391            }
392    
393            /**
394             */
395            @Override
396            public List<SCProductEntry> getSCLicenseSCProductEntries(long licenseId) {
397                    return scLicensePersistence.getSCProductEntries(licenseId);
398            }
399    
400            /**
401             */
402            @Override
403            public List<SCProductEntry> getSCLicenseSCProductEntries(long licenseId,
404                    int start, int end) {
405                    return scLicensePersistence.getSCProductEntries(licenseId, start, end);
406            }
407    
408            /**
409             */
410            @Override
411            public List<SCProductEntry> getSCLicenseSCProductEntries(long licenseId,
412                    int start, int end, OrderByComparator<SCProductEntry> orderByComparator) {
413                    return scLicensePersistence.getSCProductEntries(licenseId, start, end,
414                            orderByComparator);
415            }
416    
417            /**
418             */
419            @Override
420            public int getSCLicenseSCProductEntriesCount(long licenseId) {
421                    return scLicensePersistence.getSCProductEntriesSize(licenseId);
422            }
423    
424            /**
425             */
426            @Override
427            public boolean hasSCLicenseSCProductEntry(long licenseId,
428                    long productEntryId) {
429                    return scLicensePersistence.containsSCProductEntry(licenseId,
430                            productEntryId);
431            }
432    
433            /**
434             */
435            @Override
436            public boolean hasSCLicenseSCProductEntries(long licenseId) {
437                    return scLicensePersistence.containsSCProductEntries(licenseId);
438            }
439    
440            /**
441             */
442            @Override
443            public void setSCLicenseSCProductEntries(long licenseId,
444                    long[] productEntryIds) {
445                    scLicensePersistence.setSCProductEntries(licenseId, productEntryIds);
446            }
447    
448            /**
449             * Returns the s c product entry local service.
450             *
451             * @return the s c product entry local service
452             */
453            public SCProductEntryLocalService getSCProductEntryLocalService() {
454                    return scProductEntryLocalService;
455            }
456    
457            /**
458             * Sets the s c product entry local service.
459             *
460             * @param scProductEntryLocalService the s c product entry local service
461             */
462            public void setSCProductEntryLocalService(
463                    SCProductEntryLocalService scProductEntryLocalService) {
464                    this.scProductEntryLocalService = scProductEntryLocalService;
465            }
466    
467            /**
468             * Returns the s c product entry remote service.
469             *
470             * @return the s c product entry remote service
471             */
472            public com.liferay.portlet.softwarecatalog.service.SCProductEntryService getSCProductEntryService() {
473                    return scProductEntryService;
474            }
475    
476            /**
477             * Sets the s c product entry remote service.
478             *
479             * @param scProductEntryService the s c product entry remote service
480             */
481            public void setSCProductEntryService(
482                    com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService) {
483                    this.scProductEntryService = scProductEntryService;
484            }
485    
486            /**
487             * Returns the s c product entry persistence.
488             *
489             * @return the s c product entry persistence
490             */
491            public SCProductEntryPersistence getSCProductEntryPersistence() {
492                    return scProductEntryPersistence;
493            }
494    
495            /**
496             * Sets the s c product entry persistence.
497             *
498             * @param scProductEntryPersistence the s c product entry persistence
499             */
500            public void setSCProductEntryPersistence(
501                    SCProductEntryPersistence scProductEntryPersistence) {
502                    this.scProductEntryPersistence = scProductEntryPersistence;
503            }
504    
505            /**
506             * Returns the counter local service.
507             *
508             * @return the counter local service
509             */
510            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
511                    return counterLocalService;
512            }
513    
514            /**
515             * Sets the counter local service.
516             *
517             * @param counterLocalService the counter local service
518             */
519            public void setCounterLocalService(
520                    com.liferay.counter.service.CounterLocalService counterLocalService) {
521                    this.counterLocalService = counterLocalService;
522            }
523    
524            /**
525             * Returns the group local service.
526             *
527             * @return the group local service
528             */
529            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
530                    return groupLocalService;
531            }
532    
533            /**
534             * Sets the group local service.
535             *
536             * @param groupLocalService the group local service
537             */
538            public void setGroupLocalService(
539                    com.liferay.portal.service.GroupLocalService groupLocalService) {
540                    this.groupLocalService = groupLocalService;
541            }
542    
543            /**
544             * Returns the group remote service.
545             *
546             * @return the group remote service
547             */
548            public com.liferay.portal.service.GroupService getGroupService() {
549                    return groupService;
550            }
551    
552            /**
553             * Sets the group remote service.
554             *
555             * @param groupService the group remote service
556             */
557            public void setGroupService(
558                    com.liferay.portal.service.GroupService groupService) {
559                    this.groupService = groupService;
560            }
561    
562            /**
563             * Returns the group persistence.
564             *
565             * @return the group persistence
566             */
567            public GroupPersistence getGroupPersistence() {
568                    return groupPersistence;
569            }
570    
571            /**
572             * Sets the group persistence.
573             *
574             * @param groupPersistence the group persistence
575             */
576            public void setGroupPersistence(GroupPersistence groupPersistence) {
577                    this.groupPersistence = groupPersistence;
578            }
579    
580            /**
581             * Returns the group finder.
582             *
583             * @return the group finder
584             */
585            public GroupFinder getGroupFinder() {
586                    return groupFinder;
587            }
588    
589            /**
590             * Sets the group finder.
591             *
592             * @param groupFinder the group finder
593             */
594            public void setGroupFinder(GroupFinder groupFinder) {
595                    this.groupFinder = groupFinder;
596            }
597    
598            /**
599             * Returns the image local service.
600             *
601             * @return the image local service
602             */
603            public com.liferay.portal.service.ImageLocalService getImageLocalService() {
604                    return imageLocalService;
605            }
606    
607            /**
608             * Sets the image local service.
609             *
610             * @param imageLocalService the image local service
611             */
612            public void setImageLocalService(
613                    com.liferay.portal.service.ImageLocalService imageLocalService) {
614                    this.imageLocalService = imageLocalService;
615            }
616    
617            /**
618             * Returns the image remote service.
619             *
620             * @return the image remote service
621             */
622            public com.liferay.portal.service.ImageService getImageService() {
623                    return imageService;
624            }
625    
626            /**
627             * Sets the image remote service.
628             *
629             * @param imageService the image remote service
630             */
631            public void setImageService(
632                    com.liferay.portal.service.ImageService imageService) {
633                    this.imageService = imageService;
634            }
635    
636            /**
637             * Returns the image persistence.
638             *
639             * @return the image persistence
640             */
641            public ImagePersistence getImagePersistence() {
642                    return imagePersistence;
643            }
644    
645            /**
646             * Sets the image persistence.
647             *
648             * @param imagePersistence the image persistence
649             */
650            public void setImagePersistence(ImagePersistence imagePersistence) {
651                    this.imagePersistence = imagePersistence;
652            }
653    
654            /**
655             * Returns the resource local service.
656             *
657             * @return the resource local service
658             */
659            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
660                    return resourceLocalService;
661            }
662    
663            /**
664             * Sets the resource local service.
665             *
666             * @param resourceLocalService the resource local service
667             */
668            public void setResourceLocalService(
669                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
670                    this.resourceLocalService = resourceLocalService;
671            }
672    
673            /**
674             * Returns the subscription local service.
675             *
676             * @return the subscription local service
677             */
678            public com.liferay.portal.service.SubscriptionLocalService getSubscriptionLocalService() {
679                    return subscriptionLocalService;
680            }
681    
682            /**
683             * Sets the subscription local service.
684             *
685             * @param subscriptionLocalService the subscription local service
686             */
687            public void setSubscriptionLocalService(
688                    com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService) {
689                    this.subscriptionLocalService = subscriptionLocalService;
690            }
691    
692            /**
693             * Returns the subscription persistence.
694             *
695             * @return the subscription persistence
696             */
697            public SubscriptionPersistence getSubscriptionPersistence() {
698                    return subscriptionPersistence;
699            }
700    
701            /**
702             * Sets the subscription persistence.
703             *
704             * @param subscriptionPersistence the subscription persistence
705             */
706            public void setSubscriptionPersistence(
707                    SubscriptionPersistence subscriptionPersistence) {
708                    this.subscriptionPersistence = subscriptionPersistence;
709            }
710    
711            /**
712             * Returns the user local service.
713             *
714             * @return the user local service
715             */
716            public com.liferay.portal.service.UserLocalService getUserLocalService() {
717                    return userLocalService;
718            }
719    
720            /**
721             * Sets the user local service.
722             *
723             * @param userLocalService the user local service
724             */
725            public void setUserLocalService(
726                    com.liferay.portal.service.UserLocalService userLocalService) {
727                    this.userLocalService = userLocalService;
728            }
729    
730            /**
731             * Returns the user remote service.
732             *
733             * @return the user remote service
734             */
735            public com.liferay.portal.service.UserService getUserService() {
736                    return userService;
737            }
738    
739            /**
740             * Sets the user remote service.
741             *
742             * @param userService the user remote service
743             */
744            public void setUserService(
745                    com.liferay.portal.service.UserService userService) {
746                    this.userService = userService;
747            }
748    
749            /**
750             * Returns the user persistence.
751             *
752             * @return the user persistence
753             */
754            public UserPersistence getUserPersistence() {
755                    return userPersistence;
756            }
757    
758            /**
759             * Sets the user persistence.
760             *
761             * @param userPersistence the user persistence
762             */
763            public void setUserPersistence(UserPersistence userPersistence) {
764                    this.userPersistence = userPersistence;
765            }
766    
767            /**
768             * Returns the user finder.
769             *
770             * @return the user finder
771             */
772            public UserFinder getUserFinder() {
773                    return userFinder;
774            }
775    
776            /**
777             * Sets the user finder.
778             *
779             * @param userFinder the user finder
780             */
781            public void setUserFinder(UserFinder userFinder) {
782                    this.userFinder = userFinder;
783            }
784    
785            /**
786             * Returns the message-boards message local service.
787             *
788             * @return the message-boards message local service
789             */
790            public com.liferay.portlet.messageboards.service.MBMessageLocalService getMBMessageLocalService() {
791                    return mbMessageLocalService;
792            }
793    
794            /**
795             * Sets the message-boards message local service.
796             *
797             * @param mbMessageLocalService the message-boards message local service
798             */
799            public void setMBMessageLocalService(
800                    com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService) {
801                    this.mbMessageLocalService = mbMessageLocalService;
802            }
803    
804            /**
805             * Returns the message-boards message remote service.
806             *
807             * @return the message-boards message remote service
808             */
809            public com.liferay.portlet.messageboards.service.MBMessageService getMBMessageService() {
810                    return mbMessageService;
811            }
812    
813            /**
814             * Sets the message-boards message remote service.
815             *
816             * @param mbMessageService the message-boards message remote service
817             */
818            public void setMBMessageService(
819                    com.liferay.portlet.messageboards.service.MBMessageService mbMessageService) {
820                    this.mbMessageService = mbMessageService;
821            }
822    
823            /**
824             * Returns the message-boards message persistence.
825             *
826             * @return the message-boards message persistence
827             */
828            public MBMessagePersistence getMBMessagePersistence() {
829                    return mbMessagePersistence;
830            }
831    
832            /**
833             * Sets the message-boards message persistence.
834             *
835             * @param mbMessagePersistence the message-boards message persistence
836             */
837            public void setMBMessagePersistence(
838                    MBMessagePersistence mbMessagePersistence) {
839                    this.mbMessagePersistence = mbMessagePersistence;
840            }
841    
842            /**
843             * Returns the message-boards message finder.
844             *
845             * @return the message-boards message finder
846             */
847            public MBMessageFinder getMBMessageFinder() {
848                    return mbMessageFinder;
849            }
850    
851            /**
852             * Sets the message-boards message finder.
853             *
854             * @param mbMessageFinder the message-boards message finder
855             */
856            public void setMBMessageFinder(MBMessageFinder mbMessageFinder) {
857                    this.mbMessageFinder = mbMessageFinder;
858            }
859    
860            /**
861             * Returns the ratings stats local service.
862             *
863             * @return the ratings stats local service
864             */
865            public com.liferay.portlet.ratings.service.RatingsStatsLocalService getRatingsStatsLocalService() {
866                    return ratingsStatsLocalService;
867            }
868    
869            /**
870             * Sets the ratings stats local service.
871             *
872             * @param ratingsStatsLocalService the ratings stats local service
873             */
874            public void setRatingsStatsLocalService(
875                    com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService) {
876                    this.ratingsStatsLocalService = ratingsStatsLocalService;
877            }
878    
879            /**
880             * Returns the ratings stats persistence.
881             *
882             * @return the ratings stats persistence
883             */
884            public RatingsStatsPersistence getRatingsStatsPersistence() {
885                    return ratingsStatsPersistence;
886            }
887    
888            /**
889             * Sets the ratings stats persistence.
890             *
891             * @param ratingsStatsPersistence the ratings stats persistence
892             */
893            public void setRatingsStatsPersistence(
894                    RatingsStatsPersistence ratingsStatsPersistence) {
895                    this.ratingsStatsPersistence = ratingsStatsPersistence;
896            }
897    
898            /**
899             * Returns the ratings stats finder.
900             *
901             * @return the ratings stats finder
902             */
903            public RatingsStatsFinder getRatingsStatsFinder() {
904                    return ratingsStatsFinder;
905            }
906    
907            /**
908             * Sets the ratings stats finder.
909             *
910             * @param ratingsStatsFinder the ratings stats finder
911             */
912            public void setRatingsStatsFinder(RatingsStatsFinder ratingsStatsFinder) {
913                    this.ratingsStatsFinder = ratingsStatsFinder;
914            }
915    
916            /**
917             * Returns the s c license local service.
918             *
919             * @return the s c license local service
920             */
921            public com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService getSCLicenseLocalService() {
922                    return scLicenseLocalService;
923            }
924    
925            /**
926             * Sets the s c license local service.
927             *
928             * @param scLicenseLocalService the s c license local service
929             */
930            public void setSCLicenseLocalService(
931                    com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService scLicenseLocalService) {
932                    this.scLicenseLocalService = scLicenseLocalService;
933            }
934    
935            /**
936             * Returns the s c license remote service.
937             *
938             * @return the s c license remote service
939             */
940            public com.liferay.portlet.softwarecatalog.service.SCLicenseService getSCLicenseService() {
941                    return scLicenseService;
942            }
943    
944            /**
945             * Sets the s c license remote service.
946             *
947             * @param scLicenseService the s c license remote service
948             */
949            public void setSCLicenseService(
950                    com.liferay.portlet.softwarecatalog.service.SCLicenseService scLicenseService) {
951                    this.scLicenseService = scLicenseService;
952            }
953    
954            /**
955             * Returns the s c license persistence.
956             *
957             * @return the s c license persistence
958             */
959            public SCLicensePersistence getSCLicensePersistence() {
960                    return scLicensePersistence;
961            }
962    
963            /**
964             * Sets the s c license persistence.
965             *
966             * @param scLicensePersistence the s c license persistence
967             */
968            public void setSCLicensePersistence(
969                    SCLicensePersistence scLicensePersistence) {
970                    this.scLicensePersistence = scLicensePersistence;
971            }
972    
973            /**
974             * Returns the s c product screenshot local service.
975             *
976             * @return the s c product screenshot local service
977             */
978            public com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
979                    return scProductScreenshotLocalService;
980            }
981    
982            /**
983             * Sets the s c product screenshot local service.
984             *
985             * @param scProductScreenshotLocalService the s c product screenshot local service
986             */
987            public void setSCProductScreenshotLocalService(
988                    com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService scProductScreenshotLocalService) {
989                    this.scProductScreenshotLocalService = scProductScreenshotLocalService;
990            }
991    
992            /**
993             * Returns the s c product screenshot persistence.
994             *
995             * @return the s c product screenshot persistence
996             */
997            public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
998                    return scProductScreenshotPersistence;
999            }
1000    
1001            /**
1002             * Sets the s c product screenshot persistence.
1003             *
1004             * @param scProductScreenshotPersistence the s c product screenshot persistence
1005             */
1006            public void setSCProductScreenshotPersistence(
1007                    SCProductScreenshotPersistence scProductScreenshotPersistence) {
1008                    this.scProductScreenshotPersistence = scProductScreenshotPersistence;
1009            }
1010    
1011            /**
1012             * Returns the s c product version local service.
1013             *
1014             * @return the s c product version local service
1015             */
1016            public com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService getSCProductVersionLocalService() {
1017                    return scProductVersionLocalService;
1018            }
1019    
1020            /**
1021             * Sets the s c product version local service.
1022             *
1023             * @param scProductVersionLocalService the s c product version local service
1024             */
1025            public void setSCProductVersionLocalService(
1026                    com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService scProductVersionLocalService) {
1027                    this.scProductVersionLocalService = scProductVersionLocalService;
1028            }
1029    
1030            /**
1031             * Returns the s c product version remote service.
1032             *
1033             * @return the s c product version remote service
1034             */
1035            public com.liferay.portlet.softwarecatalog.service.SCProductVersionService getSCProductVersionService() {
1036                    return scProductVersionService;
1037            }
1038    
1039            /**
1040             * Sets the s c product version remote service.
1041             *
1042             * @param scProductVersionService the s c product version remote service
1043             */
1044            public void setSCProductVersionService(
1045                    com.liferay.portlet.softwarecatalog.service.SCProductVersionService scProductVersionService) {
1046                    this.scProductVersionService = scProductVersionService;
1047            }
1048    
1049            /**
1050             * Returns the s c product version persistence.
1051             *
1052             * @return the s c product version persistence
1053             */
1054            public SCProductVersionPersistence getSCProductVersionPersistence() {
1055                    return scProductVersionPersistence;
1056            }
1057    
1058            /**
1059             * Sets the s c product version persistence.
1060             *
1061             * @param scProductVersionPersistence the s c product version persistence
1062             */
1063            public void setSCProductVersionPersistence(
1064                    SCProductVersionPersistence scProductVersionPersistence) {
1065                    this.scProductVersionPersistence = scProductVersionPersistence;
1066            }
1067    
1068            public void afterPropertiesSet() {
1069                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.softwarecatalog.model.SCProductEntry",
1070                            scProductEntryLocalService);
1071            }
1072    
1073            public void destroy() {
1074                    persistedModelLocalServiceRegistry.unregister(
1075                            "com.liferay.portlet.softwarecatalog.model.SCProductEntry");
1076            }
1077    
1078            /**
1079             * Returns the Spring bean ID for this bean.
1080             *
1081             * @return the Spring bean ID for this bean
1082             */
1083            @Override
1084            public String getBeanIdentifier() {
1085                    return _beanIdentifier;
1086            }
1087    
1088            /**
1089             * Sets the Spring bean ID for this bean.
1090             *
1091             * @param beanIdentifier the Spring bean ID for this bean
1092             */
1093            @Override
1094            public void setBeanIdentifier(String beanIdentifier) {
1095                    _beanIdentifier = beanIdentifier;
1096            }
1097    
1098            protected Class<?> getModelClass() {
1099                    return SCProductEntry.class;
1100            }
1101    
1102            protected String getModelClassName() {
1103                    return SCProductEntry.class.getName();
1104            }
1105    
1106            /**
1107             * Performs a SQL query.
1108             *
1109             * @param sql the sql query
1110             */
1111            protected void runSQL(String sql) {
1112                    try {
1113                            DataSource dataSource = scProductEntryPersistence.getDataSource();
1114    
1115                            DB db = DBFactoryUtil.getDB();
1116    
1117                            sql = db.buildSQL(sql);
1118                            sql = PortalUtil.transformSQL(sql);
1119    
1120                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1121                                            sql, new int[0]);
1122    
1123                            sqlUpdate.update();
1124                    }
1125                    catch (Exception e) {
1126                            throw new SystemException(e);
1127                    }
1128            }
1129    
1130            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService.class)
1131            protected SCProductEntryLocalService scProductEntryLocalService;
1132            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductEntryService.class)
1133            protected com.liferay.portlet.softwarecatalog.service.SCProductEntryService scProductEntryService;
1134            @BeanReference(type = SCProductEntryPersistence.class)
1135            protected SCProductEntryPersistence scProductEntryPersistence;
1136            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1137            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1138            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1139            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1140            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1141            protected com.liferay.portal.service.GroupService groupService;
1142            @BeanReference(type = GroupPersistence.class)
1143            protected GroupPersistence groupPersistence;
1144            @BeanReference(type = GroupFinder.class)
1145            protected GroupFinder groupFinder;
1146            @BeanReference(type = com.liferay.portal.service.ImageLocalService.class)
1147            protected com.liferay.portal.service.ImageLocalService imageLocalService;
1148            @BeanReference(type = com.liferay.portal.service.ImageService.class)
1149            protected com.liferay.portal.service.ImageService imageService;
1150            @BeanReference(type = ImagePersistence.class)
1151            protected ImagePersistence imagePersistence;
1152            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
1153            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
1154            @BeanReference(type = com.liferay.portal.service.SubscriptionLocalService.class)
1155            protected com.liferay.portal.service.SubscriptionLocalService subscriptionLocalService;
1156            @BeanReference(type = SubscriptionPersistence.class)
1157            protected SubscriptionPersistence subscriptionPersistence;
1158            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
1159            protected com.liferay.portal.service.UserLocalService userLocalService;
1160            @BeanReference(type = com.liferay.portal.service.UserService.class)
1161            protected com.liferay.portal.service.UserService userService;
1162            @BeanReference(type = UserPersistence.class)
1163            protected UserPersistence userPersistence;
1164            @BeanReference(type = UserFinder.class)
1165            protected UserFinder userFinder;
1166            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageLocalService.class)
1167            protected com.liferay.portlet.messageboards.service.MBMessageLocalService mbMessageLocalService;
1168            @BeanReference(type = com.liferay.portlet.messageboards.service.MBMessageService.class)
1169            protected com.liferay.portlet.messageboards.service.MBMessageService mbMessageService;
1170            @BeanReference(type = MBMessagePersistence.class)
1171            protected MBMessagePersistence mbMessagePersistence;
1172            @BeanReference(type = MBMessageFinder.class)
1173            protected MBMessageFinder mbMessageFinder;
1174            @BeanReference(type = com.liferay.portlet.ratings.service.RatingsStatsLocalService.class)
1175            protected com.liferay.portlet.ratings.service.RatingsStatsLocalService ratingsStatsLocalService;
1176            @BeanReference(type = RatingsStatsPersistence.class)
1177            protected RatingsStatsPersistence ratingsStatsPersistence;
1178            @BeanReference(type = RatingsStatsFinder.class)
1179            protected RatingsStatsFinder ratingsStatsFinder;
1180            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService.class)
1181            protected com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService scLicenseLocalService;
1182            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCLicenseService.class)
1183            protected com.liferay.portlet.softwarecatalog.service.SCLicenseService scLicenseService;
1184            @BeanReference(type = SCLicensePersistence.class)
1185            protected SCLicensePersistence scLicensePersistence;
1186            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService.class)
1187            protected com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService scProductScreenshotLocalService;
1188            @BeanReference(type = SCProductScreenshotPersistence.class)
1189            protected SCProductScreenshotPersistence scProductScreenshotPersistence;
1190            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService.class)
1191            protected com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService scProductVersionLocalService;
1192            @BeanReference(type = com.liferay.portlet.softwarecatalog.service.SCProductVersionService.class)
1193            protected com.liferay.portlet.softwarecatalog.service.SCProductVersionService scProductVersionService;
1194            @BeanReference(type = SCProductVersionPersistence.class)
1195            protected SCProductVersionPersistence scProductVersionPersistence;
1196            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
1197            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
1198            private String _beanIdentifier;
1199    }