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.trash.service.base;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.BeanReference;
020    import com.liferay.portal.kernel.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.Projection;
029    import com.liferay.portal.kernel.exception.PortalException;
030    import com.liferay.portal.kernel.exception.SystemException;
031    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
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.ClassNamePersistence;
039    import com.liferay.portal.service.persistence.GroupFinder;
040    import com.liferay.portal.service.persistence.GroupPersistence;
041    import com.liferay.portal.service.persistence.SystemEventPersistence;
042    import com.liferay.portal.service.persistence.UserFinder;
043    import com.liferay.portal.service.persistence.UserPersistence;
044    import com.liferay.portal.util.PortalUtil;
045    
046    import com.liferay.portlet.trash.model.TrashEntry;
047    import com.liferay.portlet.trash.service.TrashEntryLocalService;
048    import com.liferay.portlet.trash.service.persistence.TrashEntryPersistence;
049    import com.liferay.portlet.trash.service.persistence.TrashVersionPersistence;
050    
051    import java.io.Serializable;
052    
053    import java.util.List;
054    
055    import javax.sql.DataSource;
056    
057    /**
058     * Provides the base implementation for the trash entry local service.
059     *
060     * <p>
061     * 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.trash.service.impl.TrashEntryLocalServiceImpl}.
062     * </p>
063     *
064     * @author Brian Wing Shun Chan
065     * @see com.liferay.portlet.trash.service.impl.TrashEntryLocalServiceImpl
066     * @see com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil
067     * @generated
068     */
069    @ProviderType
070    public abstract class TrashEntryLocalServiceBaseImpl
071            extends BaseLocalServiceImpl implements TrashEntryLocalService,
072                    IdentifiableOSGiService {
073            /*
074             * NOTE FOR DEVELOPERS:
075             *
076             * Never modify or reference this class directly. Always use {@link com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil} to access the trash entry local service.
077             */
078    
079            /**
080             * Adds the trash entry to the database. Also notifies the appropriate model listeners.
081             *
082             * @param trashEntry the trash entry
083             * @return the trash entry that was added
084             */
085            @Indexable(type = IndexableType.REINDEX)
086            @Override
087            public TrashEntry addTrashEntry(TrashEntry trashEntry) {
088                    trashEntry.setNew(true);
089    
090                    return trashEntryPersistence.update(trashEntry);
091            }
092    
093            /**
094             * Creates a new trash entry with the primary key. Does not add the trash entry to the database.
095             *
096             * @param entryId the primary key for the new trash entry
097             * @return the new trash entry
098             */
099            @Override
100            public TrashEntry createTrashEntry(long entryId) {
101                    return trashEntryPersistence.create(entryId);
102            }
103    
104            /**
105             * Deletes the trash entry with the primary key from the database. Also notifies the appropriate model listeners.
106             *
107             * @param entryId the primary key of the trash entry
108             * @return the trash entry that was removed
109             * @throws PortalException if a trash entry with the primary key could not be found
110             */
111            @Indexable(type = IndexableType.DELETE)
112            @Override
113            public TrashEntry deleteTrashEntry(long entryId) throws PortalException {
114                    return trashEntryPersistence.remove(entryId);
115            }
116    
117            /**
118             * Deletes the trash entry from the database. Also notifies the appropriate model listeners.
119             *
120             * @param trashEntry the trash entry
121             * @return the trash entry that was removed
122             */
123            @Indexable(type = IndexableType.DELETE)
124            @Override
125            public TrashEntry deleteTrashEntry(TrashEntry trashEntry) {
126                    return trashEntryPersistence.remove(trashEntry);
127            }
128    
129            @Override
130            public DynamicQuery dynamicQuery() {
131                    Class<?> clazz = getClass();
132    
133                    return DynamicQueryFactoryUtil.forClass(TrashEntry.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 trashEntryPersistence.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.trash.model.impl.TrashEntryModelImpl}. 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 trashEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
164                            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.trash.model.impl.TrashEntryModelImpl}. 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 trashEntryPersistence.findWithDynamicQuery(dynamicQuery, start,
184                            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 trashEntryPersistence.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 trashEntryPersistence.countWithDynamicQuery(dynamicQuery,
209                            projection);
210            }
211    
212            @Override
213            public TrashEntry fetchTrashEntry(long entryId) {
214                    return trashEntryPersistence.fetchByPrimaryKey(entryId);
215            }
216    
217            /**
218             * Returns the trash entry with the primary key.
219             *
220             * @param entryId the primary key of the trash entry
221             * @return the trash entry
222             * @throws PortalException if a trash entry with the primary key could not be found
223             */
224            @Override
225            public TrashEntry getTrashEntry(long entryId) throws PortalException {
226                    return trashEntryPersistence.findByPrimaryKey(entryId);
227            }
228    
229            @Override
230            public ActionableDynamicQuery getActionableDynamicQuery() {
231                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
232    
233                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil.getService());
234                    actionableDynamicQuery.setClass(TrashEntry.class);
235                    actionableDynamicQuery.setClassLoader(getClassLoader());
236    
237                    actionableDynamicQuery.setPrimaryKeyPropertyName("entryId");
238    
239                    return actionableDynamicQuery;
240            }
241    
242            protected void initActionableDynamicQuery(
243                    ActionableDynamicQuery actionableDynamicQuery) {
244                    actionableDynamicQuery.setBaseLocalService(com.liferay.portlet.trash.service.TrashEntryLocalServiceUtil.getService());
245                    actionableDynamicQuery.setClass(TrashEntry.class);
246                    actionableDynamicQuery.setClassLoader(getClassLoader());
247    
248                    actionableDynamicQuery.setPrimaryKeyPropertyName("entryId");
249            }
250    
251            /**
252             * @throws PortalException
253             */
254            @Override
255            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
256                    throws PortalException {
257                    return trashEntryLocalService.deleteTrashEntry((TrashEntry)persistedModel);
258            }
259    
260            @Override
261            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
262                    throws PortalException {
263                    return trashEntryPersistence.findByPrimaryKey(primaryKeyObj);
264            }
265    
266            /**
267             * Returns a range of all the trash entries.
268             *
269             * <p>
270             * 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.trash.model.impl.TrashEntryModelImpl}. 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.
271             * </p>
272             *
273             * @param start the lower bound of the range of trash entries
274             * @param end the upper bound of the range of trash entries (not inclusive)
275             * @return the range of trash entries
276             */
277            @Override
278            public List<TrashEntry> getTrashEntries(int start, int end) {
279                    return trashEntryPersistence.findAll(start, end);
280            }
281    
282            /**
283             * Returns the number of trash entries.
284             *
285             * @return the number of trash entries
286             */
287            @Override
288            public int getTrashEntriesCount() {
289                    return trashEntryPersistence.countAll();
290            }
291    
292            /**
293             * Updates the trash entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
294             *
295             * @param trashEntry the trash entry
296             * @return the trash entry that was updated
297             */
298            @Indexable(type = IndexableType.REINDEX)
299            @Override
300            public TrashEntry updateTrashEntry(TrashEntry trashEntry) {
301                    return trashEntryPersistence.update(trashEntry);
302            }
303    
304            /**
305             * Returns the trash entry local service.
306             *
307             * @return the trash entry local service
308             */
309            public TrashEntryLocalService getTrashEntryLocalService() {
310                    return trashEntryLocalService;
311            }
312    
313            /**
314             * Sets the trash entry local service.
315             *
316             * @param trashEntryLocalService the trash entry local service
317             */
318            public void setTrashEntryLocalService(
319                    TrashEntryLocalService trashEntryLocalService) {
320                    this.trashEntryLocalService = trashEntryLocalService;
321            }
322    
323            /**
324             * Returns the trash entry remote service.
325             *
326             * @return the trash entry remote service
327             */
328            public com.liferay.portlet.trash.service.TrashEntryService getTrashEntryService() {
329                    return trashEntryService;
330            }
331    
332            /**
333             * Sets the trash entry remote service.
334             *
335             * @param trashEntryService the trash entry remote service
336             */
337            public void setTrashEntryService(
338                    com.liferay.portlet.trash.service.TrashEntryService trashEntryService) {
339                    this.trashEntryService = trashEntryService;
340            }
341    
342            /**
343             * Returns the trash entry persistence.
344             *
345             * @return the trash entry persistence
346             */
347            public TrashEntryPersistence getTrashEntryPersistence() {
348                    return trashEntryPersistence;
349            }
350    
351            /**
352             * Sets the trash entry persistence.
353             *
354             * @param trashEntryPersistence the trash entry persistence
355             */
356            public void setTrashEntryPersistence(
357                    TrashEntryPersistence trashEntryPersistence) {
358                    this.trashEntryPersistence = trashEntryPersistence;
359            }
360    
361            /**
362             * Returns the trash version local service.
363             *
364             * @return the trash version local service
365             */
366            public com.liferay.portlet.trash.service.TrashVersionLocalService getTrashVersionLocalService() {
367                    return trashVersionLocalService;
368            }
369    
370            /**
371             * Sets the trash version local service.
372             *
373             * @param trashVersionLocalService the trash version local service
374             */
375            public void setTrashVersionLocalService(
376                    com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService) {
377                    this.trashVersionLocalService = trashVersionLocalService;
378            }
379    
380            /**
381             * Returns the trash version persistence.
382             *
383             * @return the trash version persistence
384             */
385            public TrashVersionPersistence getTrashVersionPersistence() {
386                    return trashVersionPersistence;
387            }
388    
389            /**
390             * Sets the trash version persistence.
391             *
392             * @param trashVersionPersistence the trash version persistence
393             */
394            public void setTrashVersionPersistence(
395                    TrashVersionPersistence trashVersionPersistence) {
396                    this.trashVersionPersistence = trashVersionPersistence;
397            }
398    
399            /**
400             * Returns the counter local service.
401             *
402             * @return the counter local service
403             */
404            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
405                    return counterLocalService;
406            }
407    
408            /**
409             * Sets the counter local service.
410             *
411             * @param counterLocalService the counter local service
412             */
413            public void setCounterLocalService(
414                    com.liferay.counter.service.CounterLocalService counterLocalService) {
415                    this.counterLocalService = counterLocalService;
416            }
417    
418            /**
419             * Returns the class name local service.
420             *
421             * @return the class name local service
422             */
423            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
424                    return classNameLocalService;
425            }
426    
427            /**
428             * Sets the class name local service.
429             *
430             * @param classNameLocalService the class name local service
431             */
432            public void setClassNameLocalService(
433                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
434                    this.classNameLocalService = classNameLocalService;
435            }
436    
437            /**
438             * Returns the class name remote service.
439             *
440             * @return the class name remote service
441             */
442            public com.liferay.portal.service.ClassNameService getClassNameService() {
443                    return classNameService;
444            }
445    
446            /**
447             * Sets the class name remote service.
448             *
449             * @param classNameService the class name remote service
450             */
451            public void setClassNameService(
452                    com.liferay.portal.service.ClassNameService classNameService) {
453                    this.classNameService = classNameService;
454            }
455    
456            /**
457             * Returns the class name persistence.
458             *
459             * @return the class name persistence
460             */
461            public ClassNamePersistence getClassNamePersistence() {
462                    return classNamePersistence;
463            }
464    
465            /**
466             * Sets the class name persistence.
467             *
468             * @param classNamePersistence the class name persistence
469             */
470            public void setClassNamePersistence(
471                    ClassNamePersistence classNamePersistence) {
472                    this.classNamePersistence = classNamePersistence;
473            }
474    
475            /**
476             * Returns the group local service.
477             *
478             * @return the group local service
479             */
480            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
481                    return groupLocalService;
482            }
483    
484            /**
485             * Sets the group local service.
486             *
487             * @param groupLocalService the group local service
488             */
489            public void setGroupLocalService(
490                    com.liferay.portal.service.GroupLocalService groupLocalService) {
491                    this.groupLocalService = groupLocalService;
492            }
493    
494            /**
495             * Returns the group remote service.
496             *
497             * @return the group remote service
498             */
499            public com.liferay.portal.service.GroupService getGroupService() {
500                    return groupService;
501            }
502    
503            /**
504             * Sets the group remote service.
505             *
506             * @param groupService the group remote service
507             */
508            public void setGroupService(
509                    com.liferay.portal.service.GroupService groupService) {
510                    this.groupService = groupService;
511            }
512    
513            /**
514             * Returns the group persistence.
515             *
516             * @return the group persistence
517             */
518            public GroupPersistence getGroupPersistence() {
519                    return groupPersistence;
520            }
521    
522            /**
523             * Sets the group persistence.
524             *
525             * @param groupPersistence the group persistence
526             */
527            public void setGroupPersistence(GroupPersistence groupPersistence) {
528                    this.groupPersistence = groupPersistence;
529            }
530    
531            /**
532             * Returns the group finder.
533             *
534             * @return the group finder
535             */
536            public GroupFinder getGroupFinder() {
537                    return groupFinder;
538            }
539    
540            /**
541             * Sets the group finder.
542             *
543             * @param groupFinder the group finder
544             */
545            public void setGroupFinder(GroupFinder groupFinder) {
546                    this.groupFinder = groupFinder;
547            }
548    
549            /**
550             * Returns the resource local service.
551             *
552             * @return the resource local service
553             */
554            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
555                    return resourceLocalService;
556            }
557    
558            /**
559             * Sets the resource local service.
560             *
561             * @param resourceLocalService the resource local service
562             */
563            public void setResourceLocalService(
564                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
565                    this.resourceLocalService = resourceLocalService;
566            }
567    
568            /**
569             * Returns the system event local service.
570             *
571             * @return the system event local service
572             */
573            public com.liferay.portal.service.SystemEventLocalService getSystemEventLocalService() {
574                    return systemEventLocalService;
575            }
576    
577            /**
578             * Sets the system event local service.
579             *
580             * @param systemEventLocalService the system event local service
581             */
582            public void setSystemEventLocalService(
583                    com.liferay.portal.service.SystemEventLocalService systemEventLocalService) {
584                    this.systemEventLocalService = systemEventLocalService;
585            }
586    
587            /**
588             * Returns the system event persistence.
589             *
590             * @return the system event persistence
591             */
592            public SystemEventPersistence getSystemEventPersistence() {
593                    return systemEventPersistence;
594            }
595    
596            /**
597             * Sets the system event persistence.
598             *
599             * @param systemEventPersistence the system event persistence
600             */
601            public void setSystemEventPersistence(
602                    SystemEventPersistence systemEventPersistence) {
603                    this.systemEventPersistence = systemEventPersistence;
604            }
605    
606            /**
607             * Returns the user local service.
608             *
609             * @return the user local service
610             */
611            public com.liferay.portal.service.UserLocalService getUserLocalService() {
612                    return userLocalService;
613            }
614    
615            /**
616             * Sets the user local service.
617             *
618             * @param userLocalService the user local service
619             */
620            public void setUserLocalService(
621                    com.liferay.portal.service.UserLocalService userLocalService) {
622                    this.userLocalService = userLocalService;
623            }
624    
625            /**
626             * Returns the user remote service.
627             *
628             * @return the user remote service
629             */
630            public com.liferay.portal.service.UserService getUserService() {
631                    return userService;
632            }
633    
634            /**
635             * Sets the user remote service.
636             *
637             * @param userService the user remote service
638             */
639            public void setUserService(
640                    com.liferay.portal.service.UserService userService) {
641                    this.userService = userService;
642            }
643    
644            /**
645             * Returns the user persistence.
646             *
647             * @return the user persistence
648             */
649            public UserPersistence getUserPersistence() {
650                    return userPersistence;
651            }
652    
653            /**
654             * Sets the user persistence.
655             *
656             * @param userPersistence the user persistence
657             */
658            public void setUserPersistence(UserPersistence userPersistence) {
659                    this.userPersistence = userPersistence;
660            }
661    
662            /**
663             * Returns the user finder.
664             *
665             * @return the user finder
666             */
667            public UserFinder getUserFinder() {
668                    return userFinder;
669            }
670    
671            /**
672             * Sets the user finder.
673             *
674             * @param userFinder the user finder
675             */
676            public void setUserFinder(UserFinder userFinder) {
677                    this.userFinder = userFinder;
678            }
679    
680            public void afterPropertiesSet() {
681                    persistedModelLocalServiceRegistry.register("com.liferay.portlet.trash.model.TrashEntry",
682                            trashEntryLocalService);
683            }
684    
685            public void destroy() {
686                    persistedModelLocalServiceRegistry.unregister(
687                            "com.liferay.portlet.trash.model.TrashEntry");
688            }
689    
690            /**
691             * Returns the OSGi service identifier.
692             *
693             * @return the OSGi service identifier
694             */
695            @Override
696            public String getOSGiServiceIdentifier() {
697                    return TrashEntryLocalService.class.getName();
698            }
699    
700            protected Class<?> getModelClass() {
701                    return TrashEntry.class;
702            }
703    
704            protected String getModelClassName() {
705                    return TrashEntry.class.getName();
706            }
707    
708            /**
709             * Performs a SQL query.
710             *
711             * @param sql the sql query
712             */
713            protected void runSQL(String sql) {
714                    try {
715                            DataSource dataSource = trashEntryPersistence.getDataSource();
716    
717                            DB db = DBFactoryUtil.getDB();
718    
719                            sql = db.buildSQL(sql);
720                            sql = PortalUtil.transformSQL(sql);
721    
722                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
723                                            sql, new int[0]);
724    
725                            sqlUpdate.update();
726                    }
727                    catch (Exception e) {
728                            throw new SystemException(e);
729                    }
730            }
731    
732            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryLocalService.class)
733            protected TrashEntryLocalService trashEntryLocalService;
734            @BeanReference(type = com.liferay.portlet.trash.service.TrashEntryService.class)
735            protected com.liferay.portlet.trash.service.TrashEntryService trashEntryService;
736            @BeanReference(type = TrashEntryPersistence.class)
737            protected TrashEntryPersistence trashEntryPersistence;
738            @BeanReference(type = com.liferay.portlet.trash.service.TrashVersionLocalService.class)
739            protected com.liferay.portlet.trash.service.TrashVersionLocalService trashVersionLocalService;
740            @BeanReference(type = TrashVersionPersistence.class)
741            protected TrashVersionPersistence trashVersionPersistence;
742            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
743            protected com.liferay.counter.service.CounterLocalService counterLocalService;
744            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
745            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
746            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
747            protected com.liferay.portal.service.ClassNameService classNameService;
748            @BeanReference(type = ClassNamePersistence.class)
749            protected ClassNamePersistence classNamePersistence;
750            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
751            protected com.liferay.portal.service.GroupLocalService groupLocalService;
752            @BeanReference(type = com.liferay.portal.service.GroupService.class)
753            protected com.liferay.portal.service.GroupService groupService;
754            @BeanReference(type = GroupPersistence.class)
755            protected GroupPersistence groupPersistence;
756            @BeanReference(type = GroupFinder.class)
757            protected GroupFinder groupFinder;
758            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
759            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
760            @BeanReference(type = com.liferay.portal.service.SystemEventLocalService.class)
761            protected com.liferay.portal.service.SystemEventLocalService systemEventLocalService;
762            @BeanReference(type = SystemEventPersistence.class)
763            protected SystemEventPersistence systemEventPersistence;
764            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
765            protected com.liferay.portal.service.UserLocalService userLocalService;
766            @BeanReference(type = com.liferay.portal.service.UserService.class)
767            protected com.liferay.portal.service.UserService userService;
768            @BeanReference(type = UserPersistence.class)
769            protected UserPersistence userPersistence;
770            @BeanReference(type = UserFinder.class)
771            protected UserFinder userFinder;
772            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
773            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
774    }