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