001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.counter.service.CounterLocalService;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.bean.IdentifiableBean;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
023    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
024    import com.liferay.portal.kernel.exception.PortalException;
025    import com.liferay.portal.kernel.exception.SystemException;
026    import com.liferay.portal.kernel.log.Log;
027    import com.liferay.portal.kernel.log.LogFactoryUtil;
028    import com.liferay.portal.kernel.search.Indexer;
029    import com.liferay.portal.kernel.search.IndexerRegistryUtil;
030    import com.liferay.portal.kernel.search.SearchException;
031    import com.liferay.portal.kernel.util.OrderByComparator;
032    import com.liferay.portal.model.PersistedModel;
033    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
034    import com.liferay.portal.service.ResourceLocalService;
035    import com.liferay.portal.service.ResourceService;
036    import com.liferay.portal.service.UserLocalService;
037    import com.liferay.portal.service.UserService;
038    import com.liferay.portal.service.persistence.ResourceFinder;
039    import com.liferay.portal.service.persistence.ResourcePersistence;
040    import com.liferay.portal.service.persistence.UserFinder;
041    import com.liferay.portal.service.persistence.UserPersistence;
042    
043    import com.liferay.portlet.softwarecatalog.model.SCProductVersion;
044    import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionLocalService;
045    import com.liferay.portlet.softwarecatalog.service.SCFrameworkVersionService;
046    import com.liferay.portlet.softwarecatalog.service.SCLicenseLocalService;
047    import com.liferay.portlet.softwarecatalog.service.SCLicenseService;
048    import com.liferay.portlet.softwarecatalog.service.SCProductEntryLocalService;
049    import com.liferay.portlet.softwarecatalog.service.SCProductEntryService;
050    import com.liferay.portlet.softwarecatalog.service.SCProductScreenshotLocalService;
051    import com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalService;
052    import com.liferay.portlet.softwarecatalog.service.SCProductVersionService;
053    import com.liferay.portlet.softwarecatalog.service.persistence.SCFrameworkVersionPersistence;
054    import com.liferay.portlet.softwarecatalog.service.persistence.SCLicensePersistence;
055    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductEntryPersistence;
056    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductScreenshotPersistence;
057    import com.liferay.portlet.softwarecatalog.service.persistence.SCProductVersionPersistence;
058    
059    import java.io.Serializable;
060    
061    import java.util.List;
062    
063    import javax.sql.DataSource;
064    
065    /**
066     * The base implementation of the s c product version local service.
067     *
068     * <p>
069     * 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.SCProductVersionLocalServiceImpl}.
070     * </p>
071     *
072     * @author Brian Wing Shun Chan
073     * @see com.liferay.portlet.softwarecatalog.service.impl.SCProductVersionLocalServiceImpl
074     * @see com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalServiceUtil
075     * @generated
076     */
077    public abstract class SCProductVersionLocalServiceBaseImpl
078            implements SCProductVersionLocalService, IdentifiableBean {
079            /*
080             * NOTE FOR DEVELOPERS:
081             *
082             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.softwarecatalog.service.SCProductVersionLocalServiceUtil} to access the s c product version local service.
083             */
084    
085            /**
086             * Adds the s c product version to the database. Also notifies the appropriate model listeners.
087             *
088             * @param scProductVersion the s c product version
089             * @return the s c product version that was added
090             * @throws SystemException if a system exception occurred
091             */
092            public SCProductVersion addSCProductVersion(
093                    SCProductVersion scProductVersion) throws SystemException {
094                    scProductVersion.setNew(true);
095    
096                    scProductVersion = scProductVersionPersistence.update(scProductVersion,
097                                    false);
098    
099                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
100    
101                    if (indexer != null) {
102                            try {
103                                    indexer.reindex(scProductVersion);
104                            }
105                            catch (SearchException se) {
106                                    if (_log.isWarnEnabled()) {
107                                            _log.warn(se, se);
108                                    }
109                            }
110                    }
111    
112                    return scProductVersion;
113            }
114    
115            /**
116             * Creates a new s c product version with the primary key. Does not add the s c product version to the database.
117             *
118             * @param productVersionId the primary key for the new s c product version
119             * @return the new s c product version
120             */
121            public SCProductVersion createSCProductVersion(long productVersionId) {
122                    return scProductVersionPersistence.create(productVersionId);
123            }
124    
125            /**
126             * Deletes the s c product version with the primary key from the database. Also notifies the appropriate model listeners.
127             *
128             * @param productVersionId the primary key of the s c product version
129             * @throws PortalException if a s c product version with the primary key could not be found
130             * @throws SystemException if a system exception occurred
131             */
132            public void deleteSCProductVersion(long productVersionId)
133                    throws PortalException, SystemException {
134                    SCProductVersion scProductVersion = scProductVersionPersistence.remove(productVersionId);
135    
136                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
137    
138                    if (indexer != null) {
139                            try {
140                                    indexer.delete(scProductVersion);
141                            }
142                            catch (SearchException se) {
143                                    if (_log.isWarnEnabled()) {
144                                            _log.warn(se, se);
145                                    }
146                            }
147                    }
148            }
149    
150            /**
151             * Deletes the s c product version from the database. Also notifies the appropriate model listeners.
152             *
153             * @param scProductVersion the s c product version
154             * @throws SystemException if a system exception occurred
155             */
156            public void deleteSCProductVersion(SCProductVersion scProductVersion)
157                    throws SystemException {
158                    scProductVersionPersistence.remove(scProductVersion);
159    
160                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
161    
162                    if (indexer != null) {
163                            try {
164                                    indexer.delete(scProductVersion);
165                            }
166                            catch (SearchException se) {
167                                    if (_log.isWarnEnabled()) {
168                                            _log.warn(se, se);
169                                    }
170                            }
171                    }
172            }
173    
174            /**
175             * Performs a dynamic query on the database and returns the matching rows.
176             *
177             * @param dynamicQuery the dynamic query
178             * @return the matching rows
179             * @throws SystemException if a system exception occurred
180             */
181            @SuppressWarnings("rawtypes")
182            public List dynamicQuery(DynamicQuery dynamicQuery)
183                    throws SystemException {
184                    return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery);
185            }
186    
187            /**
188             * Performs a dynamic query on the database and returns a range of the matching rows.
189             *
190             * <p>
191             * 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.
192             * </p>
193             *
194             * @param dynamicQuery the dynamic query
195             * @param start the lower bound of the range of model instances
196             * @param end the upper bound of the range of model instances (not inclusive)
197             * @return the range of matching rows
198             * @throws SystemException if a system exception occurred
199             */
200            @SuppressWarnings("rawtypes")
201            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
202                    throws SystemException {
203                    return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery,
204                            start, end);
205            }
206    
207            /**
208             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
209             *
210             * <p>
211             * 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.
212             * </p>
213             *
214             * @param dynamicQuery the dynamic query
215             * @param start the lower bound of the range of model instances
216             * @param end the upper bound of the range of model instances (not inclusive)
217             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
218             * @return the ordered range of matching rows
219             * @throws SystemException if a system exception occurred
220             */
221            @SuppressWarnings("rawtypes")
222            public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
223                    OrderByComparator orderByComparator) throws SystemException {
224                    return scProductVersionPersistence.findWithDynamicQuery(dynamicQuery,
225                            start, end, orderByComparator);
226            }
227    
228            /**
229             * Returns the number of rows that match the dynamic query.
230             *
231             * @param dynamicQuery the dynamic query
232             * @return the number of rows that match the dynamic query
233             * @throws SystemException if a system exception occurred
234             */
235            public long dynamicQueryCount(DynamicQuery dynamicQuery)
236                    throws SystemException {
237                    return scProductVersionPersistence.countWithDynamicQuery(dynamicQuery);
238            }
239    
240            public SCProductVersion fetchSCProductVersion(long productVersionId)
241                    throws SystemException {
242                    return scProductVersionPersistence.fetchByPrimaryKey(productVersionId);
243            }
244    
245            /**
246             * Returns the s c product version with the primary key.
247             *
248             * @param productVersionId the primary key of the s c product version
249             * @return the s c product version
250             * @throws PortalException if a s c product version with the primary key could not be found
251             * @throws SystemException if a system exception occurred
252             */
253            public SCProductVersion getSCProductVersion(long productVersionId)
254                    throws PortalException, SystemException {
255                    return scProductVersionPersistence.findByPrimaryKey(productVersionId);
256            }
257    
258            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
259                    throws PortalException, SystemException {
260                    return scProductVersionPersistence.findByPrimaryKey(primaryKeyObj);
261            }
262    
263            /**
264             * Returns a range of all the s c product versions.
265             *
266             * <p>
267             * 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.
268             * </p>
269             *
270             * @param start the lower bound of the range of s c product versions
271             * @param end the upper bound of the range of s c product versions (not inclusive)
272             * @return the range of s c product versions
273             * @throws SystemException if a system exception occurred
274             */
275            public List<SCProductVersion> getSCProductVersions(int start, int end)
276                    throws SystemException {
277                    return scProductVersionPersistence.findAll(start, end);
278            }
279    
280            /**
281             * Returns the number of s c product versions.
282             *
283             * @return the number of s c product versions
284             * @throws SystemException if a system exception occurred
285             */
286            public int getSCProductVersionsCount() throws SystemException {
287                    return scProductVersionPersistence.countAll();
288            }
289    
290            /**
291             * Updates the s c product version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
292             *
293             * @param scProductVersion the s c product version
294             * @return the s c product version that was updated
295             * @throws SystemException if a system exception occurred
296             */
297            public SCProductVersion updateSCProductVersion(
298                    SCProductVersion scProductVersion) throws SystemException {
299                    return updateSCProductVersion(scProductVersion, true);
300            }
301    
302            /**
303             * Updates the s c product version in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
304             *
305             * @param scProductVersion the s c product version
306             * @param merge whether to merge the s c product version with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
307             * @return the s c product version that was updated
308             * @throws SystemException if a system exception occurred
309             */
310            public SCProductVersion updateSCProductVersion(
311                    SCProductVersion scProductVersion, boolean merge)
312                    throws SystemException {
313                    scProductVersion.setNew(false);
314    
315                    scProductVersion = scProductVersionPersistence.update(scProductVersion,
316                                    merge);
317    
318                    Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName());
319    
320                    if (indexer != null) {
321                            try {
322                                    indexer.reindex(scProductVersion);
323                            }
324                            catch (SearchException se) {
325                                    if (_log.isWarnEnabled()) {
326                                            _log.warn(se, se);
327                                    }
328                            }
329                    }
330    
331                    return scProductVersion;
332            }
333    
334            /**
335             * Returns the s c framework version local service.
336             *
337             * @return the s c framework version local service
338             */
339            public SCFrameworkVersionLocalService getSCFrameworkVersionLocalService() {
340                    return scFrameworkVersionLocalService;
341            }
342    
343            /**
344             * Sets the s c framework version local service.
345             *
346             * @param scFrameworkVersionLocalService the s c framework version local service
347             */
348            public void setSCFrameworkVersionLocalService(
349                    SCFrameworkVersionLocalService scFrameworkVersionLocalService) {
350                    this.scFrameworkVersionLocalService = scFrameworkVersionLocalService;
351            }
352    
353            /**
354             * Returns the s c framework version remote service.
355             *
356             * @return the s c framework version remote service
357             */
358            public SCFrameworkVersionService getSCFrameworkVersionService() {
359                    return scFrameworkVersionService;
360            }
361    
362            /**
363             * Sets the s c framework version remote service.
364             *
365             * @param scFrameworkVersionService the s c framework version remote service
366             */
367            public void setSCFrameworkVersionService(
368                    SCFrameworkVersionService scFrameworkVersionService) {
369                    this.scFrameworkVersionService = scFrameworkVersionService;
370            }
371    
372            /**
373             * Returns the s c framework version persistence.
374             *
375             * @return the s c framework version persistence
376             */
377            public SCFrameworkVersionPersistence getSCFrameworkVersionPersistence() {
378                    return scFrameworkVersionPersistence;
379            }
380    
381            /**
382             * Sets the s c framework version persistence.
383             *
384             * @param scFrameworkVersionPersistence the s c framework version persistence
385             */
386            public void setSCFrameworkVersionPersistence(
387                    SCFrameworkVersionPersistence scFrameworkVersionPersistence) {
388                    this.scFrameworkVersionPersistence = scFrameworkVersionPersistence;
389            }
390    
391            /**
392             * Returns the s c license local service.
393             *
394             * @return the s c license local service
395             */
396            public SCLicenseLocalService getSCLicenseLocalService() {
397                    return scLicenseLocalService;
398            }
399    
400            /**
401             * Sets the s c license local service.
402             *
403             * @param scLicenseLocalService the s c license local service
404             */
405            public void setSCLicenseLocalService(
406                    SCLicenseLocalService scLicenseLocalService) {
407                    this.scLicenseLocalService = scLicenseLocalService;
408            }
409    
410            /**
411             * Returns the s c license remote service.
412             *
413             * @return the s c license remote service
414             */
415            public SCLicenseService getSCLicenseService() {
416                    return scLicenseService;
417            }
418    
419            /**
420             * Sets the s c license remote service.
421             *
422             * @param scLicenseService the s c license remote service
423             */
424            public void setSCLicenseService(SCLicenseService scLicenseService) {
425                    this.scLicenseService = scLicenseService;
426            }
427    
428            /**
429             * Returns the s c license persistence.
430             *
431             * @return the s c license persistence
432             */
433            public SCLicensePersistence getSCLicensePersistence() {
434                    return scLicensePersistence;
435            }
436    
437            /**
438             * Sets the s c license persistence.
439             *
440             * @param scLicensePersistence the s c license persistence
441             */
442            public void setSCLicensePersistence(
443                    SCLicensePersistence scLicensePersistence) {
444                    this.scLicensePersistence = scLicensePersistence;
445            }
446    
447            /**
448             * Returns the s c product entry local service.
449             *
450             * @return the s c product entry local service
451             */
452            public SCProductEntryLocalService getSCProductEntryLocalService() {
453                    return scProductEntryLocalService;
454            }
455    
456            /**
457             * Sets the s c product entry local service.
458             *
459             * @param scProductEntryLocalService the s c product entry local service
460             */
461            public void setSCProductEntryLocalService(
462                    SCProductEntryLocalService scProductEntryLocalService) {
463                    this.scProductEntryLocalService = scProductEntryLocalService;
464            }
465    
466            /**
467             * Returns the s c product entry remote service.
468             *
469             * @return the s c product entry remote service
470             */
471            public SCProductEntryService getSCProductEntryService() {
472                    return scProductEntryService;
473            }
474    
475            /**
476             * Sets the s c product entry remote service.
477             *
478             * @param scProductEntryService the s c product entry remote service
479             */
480            public void setSCProductEntryService(
481                    SCProductEntryService scProductEntryService) {
482                    this.scProductEntryService = scProductEntryService;
483            }
484    
485            /**
486             * Returns the s c product entry persistence.
487             *
488             * @return the s c product entry persistence
489             */
490            public SCProductEntryPersistence getSCProductEntryPersistence() {
491                    return scProductEntryPersistence;
492            }
493    
494            /**
495             * Sets the s c product entry persistence.
496             *
497             * @param scProductEntryPersistence the s c product entry persistence
498             */
499            public void setSCProductEntryPersistence(
500                    SCProductEntryPersistence scProductEntryPersistence) {
501                    this.scProductEntryPersistence = scProductEntryPersistence;
502            }
503    
504            /**
505             * Returns the s c product screenshot local service.
506             *
507             * @return the s c product screenshot local service
508             */
509            public SCProductScreenshotLocalService getSCProductScreenshotLocalService() {
510                    return scProductScreenshotLocalService;
511            }
512    
513            /**
514             * Sets the s c product screenshot local service.
515             *
516             * @param scProductScreenshotLocalService the s c product screenshot local service
517             */
518            public void setSCProductScreenshotLocalService(
519                    SCProductScreenshotLocalService scProductScreenshotLocalService) {
520                    this.scProductScreenshotLocalService = scProductScreenshotLocalService;
521            }
522    
523            /**
524             * Returns the s c product screenshot persistence.
525             *
526             * @return the s c product screenshot persistence
527             */
528            public SCProductScreenshotPersistence getSCProductScreenshotPersistence() {
529                    return scProductScreenshotPersistence;
530            }
531    
532            /**
533             * Sets the s c product screenshot persistence.
534             *
535             * @param scProductScreenshotPersistence the s c product screenshot persistence
536             */
537            public void setSCProductScreenshotPersistence(
538                    SCProductScreenshotPersistence scProductScreenshotPersistence) {
539                    this.scProductScreenshotPersistence = scProductScreenshotPersistence;
540            }
541    
542            /**
543             * Returns the s c product version local service.
544             *
545             * @return the s c product version local service
546             */
547            public SCProductVersionLocalService getSCProductVersionLocalService() {
548                    return scProductVersionLocalService;
549            }
550    
551            /**
552             * Sets the s c product version local service.
553             *
554             * @param scProductVersionLocalService the s c product version local service
555             */
556            public void setSCProductVersionLocalService(
557                    SCProductVersionLocalService scProductVersionLocalService) {
558                    this.scProductVersionLocalService = scProductVersionLocalService;
559            }
560    
561            /**
562             * Returns the s c product version remote service.
563             *
564             * @return the s c product version remote service
565             */
566            public SCProductVersionService getSCProductVersionService() {
567                    return scProductVersionService;
568            }
569    
570            /**
571             * Sets the s c product version remote service.
572             *
573             * @param scProductVersionService the s c product version remote service
574             */
575            public void setSCProductVersionService(
576                    SCProductVersionService scProductVersionService) {
577                    this.scProductVersionService = scProductVersionService;
578            }
579    
580            /**
581             * Returns the s c product version persistence.
582             *
583             * @return the s c product version persistence
584             */
585            public SCProductVersionPersistence getSCProductVersionPersistence() {
586                    return scProductVersionPersistence;
587            }
588    
589            /**
590             * Sets the s c product version persistence.
591             *
592             * @param scProductVersionPersistence the s c product version persistence
593             */
594            public void setSCProductVersionPersistence(
595                    SCProductVersionPersistence scProductVersionPersistence) {
596                    this.scProductVersionPersistence = scProductVersionPersistence;
597            }
598    
599            /**
600             * Returns the counter local service.
601             *
602             * @return the counter local service
603             */
604            public CounterLocalService getCounterLocalService() {
605                    return counterLocalService;
606            }
607    
608            /**
609             * Sets the counter local service.
610             *
611             * @param counterLocalService the counter local service
612             */
613            public void setCounterLocalService(CounterLocalService counterLocalService) {
614                    this.counterLocalService = counterLocalService;
615            }
616    
617            /**
618             * Returns the resource local service.
619             *
620             * @return the resource local service
621             */
622            public ResourceLocalService getResourceLocalService() {
623                    return resourceLocalService;
624            }
625    
626            /**
627             * Sets the resource local service.
628             *
629             * @param resourceLocalService the resource local service
630             */
631            public void setResourceLocalService(
632                    ResourceLocalService resourceLocalService) {
633                    this.resourceLocalService = resourceLocalService;
634            }
635    
636            /**
637             * Returns the resource remote service.
638             *
639             * @return the resource remote service
640             */
641            public ResourceService getResourceService() {
642                    return resourceService;
643            }
644    
645            /**
646             * Sets the resource remote service.
647             *
648             * @param resourceService the resource remote service
649             */
650            public void setResourceService(ResourceService resourceService) {
651                    this.resourceService = resourceService;
652            }
653    
654            /**
655             * Returns the resource persistence.
656             *
657             * @return the resource persistence
658             */
659            public ResourcePersistence getResourcePersistence() {
660                    return resourcePersistence;
661            }
662    
663            /**
664             * Sets the resource persistence.
665             *
666             * @param resourcePersistence the resource persistence
667             */
668            public void setResourcePersistence(ResourcePersistence resourcePersistence) {
669                    this.resourcePersistence = resourcePersistence;
670            }
671    
672            /**
673             * Returns the resource finder.
674             *
675             * @return the resource finder
676             */
677            public ResourceFinder getResourceFinder() {
678                    return resourceFinder;
679            }
680    
681            /**
682             * Sets the resource finder.
683             *
684             * @param resourceFinder the resource finder
685             */
686            public void setResourceFinder(ResourceFinder resourceFinder) {
687                    this.resourceFinder = resourceFinder;
688            }
689    
690            /**
691             * Returns the user local service.
692             *
693             * @return the user local service
694             */
695            public UserLocalService getUserLocalService() {
696                    return userLocalService;
697            }
698    
699            /**
700             * Sets the user local service.
701             *
702             * @param userLocalService the user local service
703             */
704            public void setUserLocalService(UserLocalService userLocalService) {
705                    this.userLocalService = userLocalService;
706            }
707    
708            /**
709             * Returns the user remote service.
710             *
711             * @return the user remote service
712             */
713            public UserService getUserService() {
714                    return userService;
715            }
716    
717            /**
718             * Sets the user remote service.
719             *
720             * @param userService the user remote service
721             */
722            public void setUserService(UserService userService) {
723                    this.userService = userService;
724            }
725    
726            /**
727             * Returns the user persistence.
728             *
729             * @return the user persistence
730             */
731            public UserPersistence getUserPersistence() {
732                    return userPersistence;
733            }
734    
735            /**
736             * Sets the user persistence.
737             *
738             * @param userPersistence the user persistence
739             */
740            public void setUserPersistence(UserPersistence userPersistence) {
741                    this.userPersistence = userPersistence;
742            }
743    
744            /**
745             * Returns the user finder.
746             *
747             * @return the user finder
748             */
749            public UserFinder getUserFinder() {
750                    return userFinder;
751            }
752    
753            /**
754             * Sets the user finder.
755             *
756             * @param userFinder the user finder
757             */
758            public void setUserFinder(UserFinder userFinder) {
759                    this.userFinder = userFinder;
760            }
761    
762            public void afterPropertiesSet() {
763                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.softwarecatalog.model.SCProductVersion",
764                            scProductVersionLocalService);
765            }
766    
767            public void destroy() {
768                    persistedModelLocalServiceRegistry.unregister(
769                            "com.liferay.portlet.softwarecatalog.model.SCProductVersion");
770            }
771    
772            /**
773             * Returns the Spring bean ID for this bean.
774             *
775             * @return the Spring bean ID for this bean
776             */
777            public String getBeanIdentifier() {
778                    return _beanIdentifier;
779            }
780    
781            /**
782             * Sets the Spring bean ID for this bean.
783             *
784             * @param beanIdentifier the Spring bean ID for this bean
785             */
786            public void setBeanIdentifier(String beanIdentifier) {
787                    _beanIdentifier = beanIdentifier;
788            }
789    
790            protected ClassLoader getClassLoader() {
791                    Class<?> clazz = getClass();
792    
793                    return clazz.getClassLoader();
794            }
795    
796            protected Class<?> getModelClass() {
797                    return SCProductVersion.class;
798            }
799    
800            protected String getModelClassName() {
801                    return SCProductVersion.class.getName();
802            }
803    
804            /**
805             * Performs an SQL query.
806             *
807             * @param sql the sql query
808             */
809            protected void runSQL(String sql) throws SystemException {
810                    try {
811                            DataSource dataSource = scProductVersionPersistence.getDataSource();
812    
813                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
814                                            sql, new int[0]);
815    
816                            sqlUpdate.update();
817                    }
818                    catch (Exception e) {
819                            throw new SystemException(e);
820                    }
821            }
822    
823            @BeanReference(type = SCFrameworkVersionLocalService.class)
824            protected SCFrameworkVersionLocalService scFrameworkVersionLocalService;
825            @BeanReference(type = SCFrameworkVersionService.class)
826            protected SCFrameworkVersionService scFrameworkVersionService;
827            @BeanReference(type = SCFrameworkVersionPersistence.class)
828            protected SCFrameworkVersionPersistence scFrameworkVersionPersistence;
829            @BeanReference(type = SCLicenseLocalService.class)
830            protected SCLicenseLocalService scLicenseLocalService;
831            @BeanReference(type = SCLicenseService.class)
832            protected SCLicenseService scLicenseService;
833            @BeanReference(type = SCLicensePersistence.class)
834            protected SCLicensePersistence scLicensePersistence;
835            @BeanReference(type = SCProductEntryLocalService.class)
836            protected SCProductEntryLocalService scProductEntryLocalService;
837            @BeanReference(type = SCProductEntryService.class)
838            protected SCProductEntryService scProductEntryService;
839            @BeanReference(type = SCProductEntryPersistence.class)
840            protected SCProductEntryPersistence scProductEntryPersistence;
841            @BeanReference(type = SCProductScreenshotLocalService.class)
842            protected SCProductScreenshotLocalService scProductScreenshotLocalService;
843            @BeanReference(type = SCProductScreenshotPersistence.class)
844            protected SCProductScreenshotPersistence scProductScreenshotPersistence;
845            @BeanReference(type = SCProductVersionLocalService.class)
846            protected SCProductVersionLocalService scProductVersionLocalService;
847            @BeanReference(type = SCProductVersionService.class)
848            protected SCProductVersionService scProductVersionService;
849            @BeanReference(type = SCProductVersionPersistence.class)
850            protected SCProductVersionPersistence scProductVersionPersistence;
851            @BeanReference(type = CounterLocalService.class)
852            protected CounterLocalService counterLocalService;
853            @BeanReference(type = ResourceLocalService.class)
854            protected ResourceLocalService resourceLocalService;
855            @BeanReference(type = ResourceService.class)
856            protected ResourceService resourceService;
857            @BeanReference(type = ResourcePersistence.class)
858            protected ResourcePersistence resourcePersistence;
859            @BeanReference(type = ResourceFinder.class)
860            protected ResourceFinder resourceFinder;
861            @BeanReference(type = UserLocalService.class)
862            protected UserLocalService userLocalService;
863            @BeanReference(type = UserService.class)
864            protected UserService userService;
865            @BeanReference(type = UserPersistence.class)
866            protected UserPersistence userPersistence;
867            @BeanReference(type = UserFinder.class)
868            protected UserFinder userFinder;
869            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
870            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
871            private static Log _log = LogFactoryUtil.getLog(SCProductVersionLocalServiceBaseImpl.class);
872            private String _beanIdentifier;
873    }