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