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.portal.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.ExportActionableDynamicQuery;
030    import com.liferay.portal.kernel.dao.orm.Projection;
031    import com.liferay.portal.kernel.exception.PortalException;
032    import com.liferay.portal.kernel.exception.SystemException;
033    import com.liferay.portal.kernel.search.Indexable;
034    import com.liferay.portal.kernel.search.IndexableType;
035    import com.liferay.portal.kernel.util.OrderByComparator;
036    import com.liferay.portal.model.LayoutFriendlyURL;
037    import com.liferay.portal.model.PersistedModel;
038    import com.liferay.portal.service.BaseLocalServiceImpl;
039    import com.liferay.portal.service.LayoutFriendlyURLLocalService;
040    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
041    import com.liferay.portal.service.persistence.LayoutFriendlyURLPersistence;
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.exportimport.lar.ExportImportHelperUtil;
047    import com.liferay.portlet.exportimport.lar.ManifestSummary;
048    import com.liferay.portlet.exportimport.lar.PortletDataContext;
049    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
050    import com.liferay.portlet.exportimport.lar.StagedModelType;
051    
052    import java.io.Serializable;
053    
054    import java.util.List;
055    
056    import javax.sql.DataSource;
057    
058    /**
059     * Provides the base implementation for the layout friendly u r l local service.
060     *
061     * <p>
062     * 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.portal.service.impl.LayoutFriendlyURLLocalServiceImpl}.
063     * </p>
064     *
065     * @author Brian Wing Shun Chan
066     * @see com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl
067     * @see com.liferay.portal.service.LayoutFriendlyURLLocalServiceUtil
068     * @generated
069     */
070    @ProviderType
071    public abstract class LayoutFriendlyURLLocalServiceBaseImpl
072            extends BaseLocalServiceImpl implements LayoutFriendlyURLLocalService,
073                    IdentifiableBean {
074            /*
075             * NOTE FOR DEVELOPERS:
076             *
077             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.LayoutFriendlyURLLocalServiceUtil} to access the layout friendly u r l local service.
078             */
079    
080            /**
081             * Adds the layout friendly u r l to the database. Also notifies the appropriate model listeners.
082             *
083             * @param layoutFriendlyURL the layout friendly u r l
084             * @return the layout friendly u r l that was added
085             */
086            @Indexable(type = IndexableType.REINDEX)
087            @Override
088            public LayoutFriendlyURL addLayoutFriendlyURL(
089                    LayoutFriendlyURL layoutFriendlyURL) {
090                    layoutFriendlyURL.setNew(true);
091    
092                    return layoutFriendlyURLPersistence.update(layoutFriendlyURL);
093            }
094    
095            /**
096             * Creates a new layout friendly u r l with the primary key. Does not add the layout friendly u r l to the database.
097             *
098             * @param layoutFriendlyURLId the primary key for the new layout friendly u r l
099             * @return the new layout friendly u r l
100             */
101            @Override
102            public LayoutFriendlyURL createLayoutFriendlyURL(long layoutFriendlyURLId) {
103                    return layoutFriendlyURLPersistence.create(layoutFriendlyURLId);
104            }
105    
106            /**
107             * Deletes the layout friendly u r l with the primary key from the database. Also notifies the appropriate model listeners.
108             *
109             * @param layoutFriendlyURLId the primary key of the layout friendly u r l
110             * @return the layout friendly u r l that was removed
111             * @throws PortalException if a layout friendly u r l with the primary key could not be found
112             */
113            @Indexable(type = IndexableType.DELETE)
114            @Override
115            public LayoutFriendlyURL deleteLayoutFriendlyURL(long layoutFriendlyURLId)
116                    throws PortalException {
117                    return layoutFriendlyURLPersistence.remove(layoutFriendlyURLId);
118            }
119    
120            /**
121             * Deletes the layout friendly u r l from the database. Also notifies the appropriate model listeners.
122             *
123             * @param layoutFriendlyURL the layout friendly u r l
124             * @return the layout friendly u r l that was removed
125             */
126            @Indexable(type = IndexableType.DELETE)
127            @Override
128            public LayoutFriendlyURL deleteLayoutFriendlyURL(
129                    LayoutFriendlyURL layoutFriendlyURL) {
130                    return layoutFriendlyURLPersistence.remove(layoutFriendlyURL);
131            }
132    
133            @Override
134            public DynamicQuery dynamicQuery() {
135                    Class<?> clazz = getClass();
136    
137                    return DynamicQueryFactoryUtil.forClass(LayoutFriendlyURL.class,
138                            clazz.getClassLoader());
139            }
140    
141            /**
142             * Performs a dynamic query on the database and returns the matching rows.
143             *
144             * @param dynamicQuery the dynamic query
145             * @return the matching rows
146             */
147            @Override
148            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
149                    return layoutFriendlyURLPersistence.findWithDynamicQuery(dynamicQuery);
150            }
151    
152            /**
153             * Performs a dynamic query on the database and returns a range of the matching rows.
154             *
155             * <p>
156             * 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.portal.model.impl.LayoutFriendlyURLModelImpl}. 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.
157             * </p>
158             *
159             * @param dynamicQuery the dynamic query
160             * @param start the lower bound of the range of model instances
161             * @param end the upper bound of the range of model instances (not inclusive)
162             * @return the range of matching rows
163             */
164            @Override
165            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
166                    int end) {
167                    return layoutFriendlyURLPersistence.findWithDynamicQuery(dynamicQuery,
168                            start, end);
169            }
170    
171            /**
172             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
173             *
174             * <p>
175             * 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.portal.model.impl.LayoutFriendlyURLModelImpl}. 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.
176             * </p>
177             *
178             * @param dynamicQuery the dynamic query
179             * @param start the lower bound of the range of model instances
180             * @param end the upper bound of the range of model instances (not inclusive)
181             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
182             * @return the ordered range of matching rows
183             */
184            @Override
185            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
186                    int end, OrderByComparator<T> orderByComparator) {
187                    return layoutFriendlyURLPersistence.findWithDynamicQuery(dynamicQuery,
188                            start, end, orderByComparator);
189            }
190    
191            /**
192             * Returns the number of rows matching the dynamic query.
193             *
194             * @param dynamicQuery the dynamic query
195             * @return the number of rows matching the dynamic query
196             */
197            @Override
198            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
199                    return layoutFriendlyURLPersistence.countWithDynamicQuery(dynamicQuery);
200            }
201    
202            /**
203             * Returns the number of rows matching the dynamic query.
204             *
205             * @param dynamicQuery the dynamic query
206             * @param projection the projection to apply to the query
207             * @return the number of rows matching the dynamic query
208             */
209            @Override
210            public long dynamicQueryCount(DynamicQuery dynamicQuery,
211                    Projection projection) {
212                    return layoutFriendlyURLPersistence.countWithDynamicQuery(dynamicQuery,
213                            projection);
214            }
215    
216            @Override
217            public LayoutFriendlyURL fetchLayoutFriendlyURL(long layoutFriendlyURLId) {
218                    return layoutFriendlyURLPersistence.fetchByPrimaryKey(layoutFriendlyURLId);
219            }
220    
221            /**
222             * Returns the layout friendly u r l matching the UUID and group.
223             *
224             * @param uuid the layout friendly u r l's UUID
225             * @param groupId the primary key of the group
226             * @return the matching layout friendly u r l, or <code>null</code> if a matching layout friendly u r l could not be found
227             */
228            @Override
229            public LayoutFriendlyURL fetchLayoutFriendlyURLByUuidAndGroupId(
230                    String uuid, long groupId) {
231                    return layoutFriendlyURLPersistence.fetchByUUID_G(uuid, groupId);
232            }
233    
234            /**
235             * Returns the layout friendly u r l with the primary key.
236             *
237             * @param layoutFriendlyURLId the primary key of the layout friendly u r l
238             * @return the layout friendly u r l
239             * @throws PortalException if a layout friendly u r l with the primary key could not be found
240             */
241            @Override
242            public LayoutFriendlyURL getLayoutFriendlyURL(long layoutFriendlyURLId)
243                    throws PortalException {
244                    return layoutFriendlyURLPersistence.findByPrimaryKey(layoutFriendlyURLId);
245            }
246    
247            @Override
248            public ActionableDynamicQuery getActionableDynamicQuery() {
249                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
250    
251                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutFriendlyURLLocalServiceUtil.getService());
252                    actionableDynamicQuery.setClass(LayoutFriendlyURL.class);
253                    actionableDynamicQuery.setClassLoader(getClassLoader());
254    
255                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutFriendlyURLId");
256    
257                    return actionableDynamicQuery;
258            }
259    
260            protected void initActionableDynamicQuery(
261                    ActionableDynamicQuery actionableDynamicQuery) {
262                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.LayoutFriendlyURLLocalServiceUtil.getService());
263                    actionableDynamicQuery.setClass(LayoutFriendlyURL.class);
264                    actionableDynamicQuery.setClassLoader(getClassLoader());
265    
266                    actionableDynamicQuery.setPrimaryKeyPropertyName("layoutFriendlyURLId");
267            }
268    
269            @Override
270            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
271                    final PortletDataContext portletDataContext) {
272                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
273                                    @Override
274                                    public long performCount() throws PortalException {
275                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
276    
277                                            StagedModelType stagedModelType = getStagedModelType();
278    
279                                            long modelAdditionCount = super.performCount();
280    
281                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
282                                                    modelAdditionCount);
283    
284                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
285                                                            stagedModelType);
286    
287                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
288                                                    modelDeletionCount);
289    
290                                            return modelAdditionCount;
291                                    }
292                            };
293    
294                    initActionableDynamicQuery(exportActionableDynamicQuery);
295    
296                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
297                                    @Override
298                                    public void addCriteria(DynamicQuery dynamicQuery) {
299                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
300                                                    "modifiedDate");
301                                    }
302                            });
303    
304                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
305    
306                    exportActionableDynamicQuery.setGroupId(portletDataContext.getScopeGroupId());
307    
308                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
309                                    @Override
310                                    public void performAction(Object object)
311                                            throws PortalException {
312                                            LayoutFriendlyURL stagedModel = (LayoutFriendlyURL)object;
313    
314                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
315                                                    stagedModel);
316                                    }
317                            });
318                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
319                                    PortalUtil.getClassNameId(LayoutFriendlyURL.class.getName())));
320    
321                    return exportActionableDynamicQuery;
322            }
323    
324            /**
325             * @throws PortalException
326             */
327            @Override
328            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
329                    throws PortalException {
330                    return layoutFriendlyURLLocalService.deleteLayoutFriendlyURL((LayoutFriendlyURL)persistedModel);
331            }
332    
333            @Override
334            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
335                    throws PortalException {
336                    return layoutFriendlyURLPersistence.findByPrimaryKey(primaryKeyObj);
337            }
338    
339            /**
340             * Returns all the layout friendly u r ls matching the UUID and company.
341             *
342             * @param uuid the UUID of the layout friendly u r ls
343             * @param companyId the primary key of the company
344             * @return the matching layout friendly u r ls, or an empty list if no matches were found
345             */
346            @Override
347            public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId(
348                    String uuid, long companyId) {
349                    return layoutFriendlyURLPersistence.findByUuid_C(uuid, companyId);
350            }
351    
352            /**
353             * Returns a range of layout friendly u r ls matching the UUID and company.
354             *
355             * @param uuid the UUID of the layout friendly u r ls
356             * @param companyId the primary key of the company
357             * @param start the lower bound of the range of layout friendly u r ls
358             * @param end the upper bound of the range of layout friendly u r ls (not inclusive)
359             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
360             * @return the range of matching layout friendly u r ls, or an empty list if no matches were found
361             */
362            @Override
363            public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId(
364                    String uuid, long companyId, int start, int end,
365                    OrderByComparator<LayoutFriendlyURL> orderByComparator) {
366                    return layoutFriendlyURLPersistence.findByUuid_C(uuid, companyId,
367                            start, end, orderByComparator);
368            }
369    
370            /**
371             * Returns the layout friendly u r l matching the UUID and group.
372             *
373             * @param uuid the layout friendly u r l's UUID
374             * @param groupId the primary key of the group
375             * @return the matching layout friendly u r l
376             * @throws PortalException if a matching layout friendly u r l could not be found
377             */
378            @Override
379            public LayoutFriendlyURL getLayoutFriendlyURLByUuidAndGroupId(String uuid,
380                    long groupId) throws PortalException {
381                    return layoutFriendlyURLPersistence.findByUUID_G(uuid, groupId);
382            }
383    
384            /**
385             * Returns a range of all the layout friendly u r ls.
386             *
387             * <p>
388             * 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.portal.model.impl.LayoutFriendlyURLModelImpl}. 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.
389             * </p>
390             *
391             * @param start the lower bound of the range of layout friendly u r ls
392             * @param end the upper bound of the range of layout friendly u r ls (not inclusive)
393             * @return the range of layout friendly u r ls
394             */
395            @Override
396            public List<LayoutFriendlyURL> getLayoutFriendlyURLs(int start, int end) {
397                    return layoutFriendlyURLPersistence.findAll(start, end);
398            }
399    
400            /**
401             * Returns the number of layout friendly u r ls.
402             *
403             * @return the number of layout friendly u r ls
404             */
405            @Override
406            public int getLayoutFriendlyURLsCount() {
407                    return layoutFriendlyURLPersistence.countAll();
408            }
409    
410            /**
411             * Updates the layout friendly u r l in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
412             *
413             * @param layoutFriendlyURL the layout friendly u r l
414             * @return the layout friendly u r l that was updated
415             */
416            @Indexable(type = IndexableType.REINDEX)
417            @Override
418            public LayoutFriendlyURL updateLayoutFriendlyURL(
419                    LayoutFriendlyURL layoutFriendlyURL) {
420                    return layoutFriendlyURLPersistence.update(layoutFriendlyURL);
421            }
422    
423            /**
424             * Returns the layout friendly u r l local service.
425             *
426             * @return the layout friendly u r l local service
427             */
428            public LayoutFriendlyURLLocalService getLayoutFriendlyURLLocalService() {
429                    return layoutFriendlyURLLocalService;
430            }
431    
432            /**
433             * Sets the layout friendly u r l local service.
434             *
435             * @param layoutFriendlyURLLocalService the layout friendly u r l local service
436             */
437            public void setLayoutFriendlyURLLocalService(
438                    LayoutFriendlyURLLocalService layoutFriendlyURLLocalService) {
439                    this.layoutFriendlyURLLocalService = layoutFriendlyURLLocalService;
440            }
441    
442            /**
443             * Returns the layout friendly u r l persistence.
444             *
445             * @return the layout friendly u r l persistence
446             */
447            public LayoutFriendlyURLPersistence getLayoutFriendlyURLPersistence() {
448                    return layoutFriendlyURLPersistence;
449            }
450    
451            /**
452             * Sets the layout friendly u r l persistence.
453             *
454             * @param layoutFriendlyURLPersistence the layout friendly u r l persistence
455             */
456            public void setLayoutFriendlyURLPersistence(
457                    LayoutFriendlyURLPersistence layoutFriendlyURLPersistence) {
458                    this.layoutFriendlyURLPersistence = layoutFriendlyURLPersistence;
459            }
460    
461            /**
462             * Returns the counter local service.
463             *
464             * @return the counter local service
465             */
466            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
467                    return counterLocalService;
468            }
469    
470            /**
471             * Sets the counter local service.
472             *
473             * @param counterLocalService the counter local service
474             */
475            public void setCounterLocalService(
476                    com.liferay.counter.service.CounterLocalService counterLocalService) {
477                    this.counterLocalService = counterLocalService;
478            }
479    
480            /**
481             * Returns the user local service.
482             *
483             * @return the user local service
484             */
485            public com.liferay.portal.service.UserLocalService getUserLocalService() {
486                    return userLocalService;
487            }
488    
489            /**
490             * Sets the user local service.
491             *
492             * @param userLocalService the user local service
493             */
494            public void setUserLocalService(
495                    com.liferay.portal.service.UserLocalService userLocalService) {
496                    this.userLocalService = userLocalService;
497            }
498    
499            /**
500             * Returns the user remote service.
501             *
502             * @return the user remote service
503             */
504            public com.liferay.portal.service.UserService getUserService() {
505                    return userService;
506            }
507    
508            /**
509             * Sets the user remote service.
510             *
511             * @param userService the user remote service
512             */
513            public void setUserService(
514                    com.liferay.portal.service.UserService userService) {
515                    this.userService = userService;
516            }
517    
518            /**
519             * Returns the user persistence.
520             *
521             * @return the user persistence
522             */
523            public UserPersistence getUserPersistence() {
524                    return userPersistence;
525            }
526    
527            /**
528             * Sets the user persistence.
529             *
530             * @param userPersistence the user persistence
531             */
532            public void setUserPersistence(UserPersistence userPersistence) {
533                    this.userPersistence = userPersistence;
534            }
535    
536            /**
537             * Returns the user finder.
538             *
539             * @return the user finder
540             */
541            public UserFinder getUserFinder() {
542                    return userFinder;
543            }
544    
545            /**
546             * Sets the user finder.
547             *
548             * @param userFinder the user finder
549             */
550            public void setUserFinder(UserFinder userFinder) {
551                    this.userFinder = userFinder;
552            }
553    
554            public void afterPropertiesSet() {
555                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.LayoutFriendlyURL",
556                            layoutFriendlyURLLocalService);
557            }
558    
559            public void destroy() {
560                    persistedModelLocalServiceRegistry.unregister(
561                            "com.liferay.portal.model.LayoutFriendlyURL");
562            }
563    
564            /**
565             * Returns the Spring bean ID for this bean.
566             *
567             * @return the Spring bean ID for this bean
568             */
569            @Override
570            public String getBeanIdentifier() {
571                    return _beanIdentifier;
572            }
573    
574            /**
575             * Sets the Spring bean ID for this bean.
576             *
577             * @param beanIdentifier the Spring bean ID for this bean
578             */
579            @Override
580            public void setBeanIdentifier(String beanIdentifier) {
581                    _beanIdentifier = beanIdentifier;
582            }
583    
584            protected Class<?> getModelClass() {
585                    return LayoutFriendlyURL.class;
586            }
587    
588            protected String getModelClassName() {
589                    return LayoutFriendlyURL.class.getName();
590            }
591    
592            /**
593             * Performs a SQL query.
594             *
595             * @param sql the sql query
596             */
597            protected void runSQL(String sql) {
598                    try {
599                            DataSource dataSource = layoutFriendlyURLPersistence.getDataSource();
600    
601                            DB db = DBFactoryUtil.getDB();
602    
603                            sql = db.buildSQL(sql);
604                            sql = PortalUtil.transformSQL(sql);
605    
606                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
607                                            sql, new int[0]);
608    
609                            sqlUpdate.update();
610                    }
611                    catch (Exception e) {
612                            throw new SystemException(e);
613                    }
614            }
615    
616            @BeanReference(type = LayoutFriendlyURLLocalService.class)
617            protected LayoutFriendlyURLLocalService layoutFriendlyURLLocalService;
618            @BeanReference(type = LayoutFriendlyURLPersistence.class)
619            protected LayoutFriendlyURLPersistence layoutFriendlyURLPersistence;
620            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
621            protected com.liferay.counter.service.CounterLocalService counterLocalService;
622            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
623            protected com.liferay.portal.service.UserLocalService userLocalService;
624            @BeanReference(type = com.liferay.portal.service.UserService.class)
625            protected com.liferay.portal.service.UserService userService;
626            @BeanReference(type = UserPersistence.class)
627            protected UserPersistence userPersistence;
628            @BeanReference(type = UserFinder.class)
629            protected UserFinder userFinder;
630            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
631            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
632            private String _beanIdentifier;
633    }