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