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