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.dao.orm.Property;
032    import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil;
033    import com.liferay.portal.kernel.exception.PortalException;
034    import com.liferay.portal.kernel.exception.SystemException;
035    import com.liferay.portal.kernel.search.Indexable;
036    import com.liferay.portal.kernel.search.IndexableType;
037    import com.liferay.portal.kernel.util.OrderByComparator;
038    import com.liferay.portal.model.PersistedModel;
039    import com.liferay.portal.model.Phone;
040    import com.liferay.portal.service.BaseLocalServiceImpl;
041    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
042    import com.liferay.portal.service.PhoneLocalService;
043    import com.liferay.portal.service.persistence.ClassNamePersistence;
044    import com.liferay.portal.service.persistence.ListTypePersistence;
045    import com.liferay.portal.service.persistence.PhonePersistence;
046    import com.liferay.portal.service.persistence.UserFinder;
047    import com.liferay.portal.service.persistence.UserPersistence;
048    import com.liferay.portal.util.PortalUtil;
049    
050    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
051    import com.liferay.portlet.exportimport.lar.ManifestSummary;
052    import com.liferay.portlet.exportimport.lar.PortletDataContext;
053    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
054    import com.liferay.portlet.exportimport.lar.StagedModelType;
055    
056    import java.io.Serializable;
057    
058    import java.util.List;
059    
060    import javax.sql.DataSource;
061    
062    /**
063     * Provides the base implementation for the phone local service.
064     *
065     * <p>
066     * 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.PhoneLocalServiceImpl}.
067     * </p>
068     *
069     * @author Brian Wing Shun Chan
070     * @see com.liferay.portal.service.impl.PhoneLocalServiceImpl
071     * @see com.liferay.portal.service.PhoneLocalServiceUtil
072     * @generated
073     */
074    @ProviderType
075    public abstract class PhoneLocalServiceBaseImpl extends BaseLocalServiceImpl
076            implements PhoneLocalService, IdentifiableBean {
077            /*
078             * NOTE FOR DEVELOPERS:
079             *
080             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.PhoneLocalServiceUtil} to access the phone local service.
081             */
082    
083            /**
084             * Adds the phone to the database. Also notifies the appropriate model listeners.
085             *
086             * @param phone the phone
087             * @return the phone that was added
088             */
089            @Indexable(type = IndexableType.REINDEX)
090            @Override
091            public Phone addPhone(Phone phone) {
092                    phone.setNew(true);
093    
094                    return phonePersistence.update(phone);
095            }
096    
097            /**
098             * Creates a new phone with the primary key. Does not add the phone to the database.
099             *
100             * @param phoneId the primary key for the new phone
101             * @return the new phone
102             */
103            @Override
104            public Phone createPhone(long phoneId) {
105                    return phonePersistence.create(phoneId);
106            }
107    
108            /**
109             * Deletes the phone with the primary key from the database. Also notifies the appropriate model listeners.
110             *
111             * @param phoneId the primary key of the phone
112             * @return the phone that was removed
113             * @throws PortalException if a phone with the primary key could not be found
114             */
115            @Indexable(type = IndexableType.DELETE)
116            @Override
117            public Phone deletePhone(long phoneId) throws PortalException {
118                    return phonePersistence.remove(phoneId);
119            }
120    
121            /**
122             * Deletes the phone from the database. Also notifies the appropriate model listeners.
123             *
124             * @param phone the phone
125             * @return the phone that was removed
126             */
127            @Indexable(type = IndexableType.DELETE)
128            @Override
129            public Phone deletePhone(Phone phone) {
130                    return phonePersistence.remove(phone);
131            }
132    
133            @Override
134            public DynamicQuery dynamicQuery() {
135                    Class<?> clazz = getClass();
136    
137                    return DynamicQueryFactoryUtil.forClass(Phone.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 phonePersistence.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.PhoneModelImpl}. 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 phonePersistence.findWithDynamicQuery(dynamicQuery, start, end);
168            }
169    
170            /**
171             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
172             *
173             * <p>
174             * 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.PhoneModelImpl}. 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.
175             * </p>
176             *
177             * @param dynamicQuery the dynamic query
178             * @param start the lower bound of the range of model instances
179             * @param end the upper bound of the range of model instances (not inclusive)
180             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
181             * @return the ordered range of matching rows
182             */
183            @Override
184            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
185                    int end, OrderByComparator<T> orderByComparator) {
186                    return phonePersistence.findWithDynamicQuery(dynamicQuery, start, end,
187                            orderByComparator);
188            }
189    
190            /**
191             * Returns the number of rows matching the dynamic query.
192             *
193             * @param dynamicQuery the dynamic query
194             * @return the number of rows matching the dynamic query
195             */
196            @Override
197            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
198                    return phonePersistence.countWithDynamicQuery(dynamicQuery);
199            }
200    
201            /**
202             * Returns the number of rows matching the dynamic query.
203             *
204             * @param dynamicQuery the dynamic query
205             * @param projection the projection to apply to the query
206             * @return the number of rows matching the dynamic query
207             */
208            @Override
209            public long dynamicQueryCount(DynamicQuery dynamicQuery,
210                    Projection projection) {
211                    return phonePersistence.countWithDynamicQuery(dynamicQuery, projection);
212            }
213    
214            @Override
215            public Phone fetchPhone(long phoneId) {
216                    return phonePersistence.fetchByPrimaryKey(phoneId);
217            }
218    
219            /**
220             * Returns the phone with the matching UUID and company.
221             *
222             * @param uuid the phone's UUID
223             * @param companyId the primary key of the company
224             * @return the matching phone, or <code>null</code> if a matching phone could not be found
225             */
226            @Override
227            public Phone fetchPhoneByUuidAndCompanyId(String uuid, long companyId) {
228                    return phonePersistence.fetchByUuid_C_First(uuid, companyId, null);
229            }
230    
231            /**
232             * Returns the phone with the primary key.
233             *
234             * @param phoneId the primary key of the phone
235             * @return the phone
236             * @throws PortalException if a phone with the primary key could not be found
237             */
238            @Override
239            public Phone getPhone(long phoneId) throws PortalException {
240                    return phonePersistence.findByPrimaryKey(phoneId);
241            }
242    
243            @Override
244            public ActionableDynamicQuery getActionableDynamicQuery() {
245                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
246    
247                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.PhoneLocalServiceUtil.getService());
248                    actionableDynamicQuery.setClass(Phone.class);
249                    actionableDynamicQuery.setClassLoader(getClassLoader());
250    
251                    actionableDynamicQuery.setPrimaryKeyPropertyName("phoneId");
252    
253                    return actionableDynamicQuery;
254            }
255    
256            protected void initActionableDynamicQuery(
257                    ActionableDynamicQuery actionableDynamicQuery) {
258                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.PhoneLocalServiceUtil.getService());
259                    actionableDynamicQuery.setClass(Phone.class);
260                    actionableDynamicQuery.setClassLoader(getClassLoader());
261    
262                    actionableDynamicQuery.setPrimaryKeyPropertyName("phoneId");
263            }
264    
265            @Override
266            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
267                    final PortletDataContext portletDataContext) {
268                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
269                                    @Override
270                                    public long performCount() throws PortalException {
271                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
272    
273                                            StagedModelType stagedModelType = getStagedModelType();
274    
275                                            long modelAdditionCount = super.performCount();
276    
277                                            manifestSummary.addModelAdditionCount(stagedModelType.toString(),
278                                                    modelAdditionCount);
279    
280                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
281                                                            stagedModelType);
282    
283                                            manifestSummary.addModelDeletionCount(stagedModelType.toString(),
284                                                    modelDeletionCount);
285    
286                                            return modelAdditionCount;
287                                    }
288                            };
289    
290                    initActionableDynamicQuery(exportActionableDynamicQuery);
291    
292                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
293                                    @Override
294                                    public void addCriteria(DynamicQuery dynamicQuery) {
295                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
296                                                    "modifiedDate");
297    
298                                            StagedModelType stagedModelType = exportActionableDynamicQuery.getStagedModelType();
299    
300                                            if (stagedModelType.getReferrerClassNameId() >= 0) {
301                                                    Property classNameIdProperty = PropertyFactoryUtil.forName(
302                                                                    "classNameId");
303    
304                                                    dynamicQuery.add(classNameIdProperty.eq(
305                                                                    stagedModelType.getReferrerClassNameId()));
306                                            }
307                                    }
308                            });
309    
310                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
311    
312                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() {
313                                    @Override
314                                    public void performAction(Object object)
315                                            throws PortalException {
316                                            Phone stagedModel = (Phone)object;
317    
318                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
319                                                    stagedModel);
320                                    }
321                            });
322                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
323                                    PortalUtil.getClassNameId(Phone.class.getName())));
324    
325                    return exportActionableDynamicQuery;
326            }
327    
328            /**
329             * @throws PortalException
330             */
331            @Override
332            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
333                    throws PortalException {
334                    return phoneLocalService.deletePhone((Phone)persistedModel);
335            }
336    
337            @Override
338            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
339                    throws PortalException {
340                    return phonePersistence.findByPrimaryKey(primaryKeyObj);
341            }
342    
343            /**
344             * Returns the phone with the matching UUID and company.
345             *
346             * @param uuid the phone's UUID
347             * @param companyId the primary key of the company
348             * @return the matching phone
349             * @throws PortalException if a matching phone could not be found
350             */
351            @Override
352            public Phone getPhoneByUuidAndCompanyId(String uuid, long companyId)
353                    throws PortalException {
354                    return phonePersistence.findByUuid_C_First(uuid, companyId, null);
355            }
356    
357            /**
358             * Returns a range of all the phones.
359             *
360             * <p>
361             * 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.PhoneModelImpl}. 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.
362             * </p>
363             *
364             * @param start the lower bound of the range of phones
365             * @param end the upper bound of the range of phones (not inclusive)
366             * @return the range of phones
367             */
368            @Override
369            public List<Phone> getPhones(int start, int end) {
370                    return phonePersistence.findAll(start, end);
371            }
372    
373            /**
374             * Returns the number of phones.
375             *
376             * @return the number of phones
377             */
378            @Override
379            public int getPhonesCount() {
380                    return phonePersistence.countAll();
381            }
382    
383            /**
384             * Updates the phone in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
385             *
386             * @param phone the phone
387             * @return the phone that was updated
388             */
389            @Indexable(type = IndexableType.REINDEX)
390            @Override
391            public Phone updatePhone(Phone phone) {
392                    return phonePersistence.update(phone);
393            }
394    
395            /**
396             * Returns the phone local service.
397             *
398             * @return the phone local service
399             */
400            public PhoneLocalService getPhoneLocalService() {
401                    return phoneLocalService;
402            }
403    
404            /**
405             * Sets the phone local service.
406             *
407             * @param phoneLocalService the phone local service
408             */
409            public void setPhoneLocalService(PhoneLocalService phoneLocalService) {
410                    this.phoneLocalService = phoneLocalService;
411            }
412    
413            /**
414             * Returns the phone remote service.
415             *
416             * @return the phone remote service
417             */
418            public com.liferay.portal.service.PhoneService getPhoneService() {
419                    return phoneService;
420            }
421    
422            /**
423             * Sets the phone remote service.
424             *
425             * @param phoneService the phone remote service
426             */
427            public void setPhoneService(
428                    com.liferay.portal.service.PhoneService phoneService) {
429                    this.phoneService = phoneService;
430            }
431    
432            /**
433             * Returns the phone persistence.
434             *
435             * @return the phone persistence
436             */
437            public PhonePersistence getPhonePersistence() {
438                    return phonePersistence;
439            }
440    
441            /**
442             * Sets the phone persistence.
443             *
444             * @param phonePersistence the phone persistence
445             */
446            public void setPhonePersistence(PhonePersistence phonePersistence) {
447                    this.phonePersistence = phonePersistence;
448            }
449    
450            /**
451             * Returns the counter local service.
452             *
453             * @return the counter local service
454             */
455            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
456                    return counterLocalService;
457            }
458    
459            /**
460             * Sets the counter local service.
461             *
462             * @param counterLocalService the counter local service
463             */
464            public void setCounterLocalService(
465                    com.liferay.counter.service.CounterLocalService counterLocalService) {
466                    this.counterLocalService = counterLocalService;
467            }
468    
469            /**
470             * Returns the class name local service.
471             *
472             * @return the class name local service
473             */
474            public com.liferay.portal.service.ClassNameLocalService getClassNameLocalService() {
475                    return classNameLocalService;
476            }
477    
478            /**
479             * Sets the class name local service.
480             *
481             * @param classNameLocalService the class name local service
482             */
483            public void setClassNameLocalService(
484                    com.liferay.portal.service.ClassNameLocalService classNameLocalService) {
485                    this.classNameLocalService = classNameLocalService;
486            }
487    
488            /**
489             * Returns the class name remote service.
490             *
491             * @return the class name remote service
492             */
493            public com.liferay.portal.service.ClassNameService getClassNameService() {
494                    return classNameService;
495            }
496    
497            /**
498             * Sets the class name remote service.
499             *
500             * @param classNameService the class name remote service
501             */
502            public void setClassNameService(
503                    com.liferay.portal.service.ClassNameService classNameService) {
504                    this.classNameService = classNameService;
505            }
506    
507            /**
508             * Returns the class name persistence.
509             *
510             * @return the class name persistence
511             */
512            public ClassNamePersistence getClassNamePersistence() {
513                    return classNamePersistence;
514            }
515    
516            /**
517             * Sets the class name persistence.
518             *
519             * @param classNamePersistence the class name persistence
520             */
521            public void setClassNamePersistence(
522                    ClassNamePersistence classNamePersistence) {
523                    this.classNamePersistence = classNamePersistence;
524            }
525    
526            /**
527             * Returns the list type local service.
528             *
529             * @return the list type local service
530             */
531            public com.liferay.portal.service.ListTypeLocalService getListTypeLocalService() {
532                    return listTypeLocalService;
533            }
534    
535            /**
536             * Sets the list type local service.
537             *
538             * @param listTypeLocalService the list type local service
539             */
540            public void setListTypeLocalService(
541                    com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
542                    this.listTypeLocalService = listTypeLocalService;
543            }
544    
545            /**
546             * Returns the list type remote service.
547             *
548             * @return the list type remote service
549             */
550            public com.liferay.portal.service.ListTypeService getListTypeService() {
551                    return listTypeService;
552            }
553    
554            /**
555             * Sets the list type remote service.
556             *
557             * @param listTypeService the list type remote service
558             */
559            public void setListTypeService(
560                    com.liferay.portal.service.ListTypeService listTypeService) {
561                    this.listTypeService = listTypeService;
562            }
563    
564            /**
565             * Returns the list type persistence.
566             *
567             * @return the list type persistence
568             */
569            public ListTypePersistence getListTypePersistence() {
570                    return listTypePersistence;
571            }
572    
573            /**
574             * Sets the list type persistence.
575             *
576             * @param listTypePersistence the list type persistence
577             */
578            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
579                    this.listTypePersistence = listTypePersistence;
580            }
581    
582            /**
583             * Returns the user local service.
584             *
585             * @return the user local service
586             */
587            public com.liferay.portal.service.UserLocalService getUserLocalService() {
588                    return userLocalService;
589            }
590    
591            /**
592             * Sets the user local service.
593             *
594             * @param userLocalService the user local service
595             */
596            public void setUserLocalService(
597                    com.liferay.portal.service.UserLocalService userLocalService) {
598                    this.userLocalService = userLocalService;
599            }
600    
601            /**
602             * Returns the user remote service.
603             *
604             * @return the user remote service
605             */
606            public com.liferay.portal.service.UserService getUserService() {
607                    return userService;
608            }
609    
610            /**
611             * Sets the user remote service.
612             *
613             * @param userService the user remote service
614             */
615            public void setUserService(
616                    com.liferay.portal.service.UserService userService) {
617                    this.userService = userService;
618            }
619    
620            /**
621             * Returns the user persistence.
622             *
623             * @return the user persistence
624             */
625            public UserPersistence getUserPersistence() {
626                    return userPersistence;
627            }
628    
629            /**
630             * Sets the user persistence.
631             *
632             * @param userPersistence the user persistence
633             */
634            public void setUserPersistence(UserPersistence userPersistence) {
635                    this.userPersistence = userPersistence;
636            }
637    
638            /**
639             * Returns the user finder.
640             *
641             * @return the user finder
642             */
643            public UserFinder getUserFinder() {
644                    return userFinder;
645            }
646    
647            /**
648             * Sets the user finder.
649             *
650             * @param userFinder the user finder
651             */
652            public void setUserFinder(UserFinder userFinder) {
653                    this.userFinder = userFinder;
654            }
655    
656            public void afterPropertiesSet() {
657                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.Phone",
658                            phoneLocalService);
659            }
660    
661            public void destroy() {
662                    persistedModelLocalServiceRegistry.unregister(
663                            "com.liferay.portal.model.Phone");
664            }
665    
666            /**
667             * Returns the Spring bean ID for this bean.
668             *
669             * @return the Spring bean ID for this bean
670             */
671            @Override
672            public String getBeanIdentifier() {
673                    return _beanIdentifier;
674            }
675    
676            /**
677             * Sets the Spring bean ID for this bean.
678             *
679             * @param beanIdentifier the Spring bean ID for this bean
680             */
681            @Override
682            public void setBeanIdentifier(String beanIdentifier) {
683                    _beanIdentifier = beanIdentifier;
684            }
685    
686            protected Class<?> getModelClass() {
687                    return Phone.class;
688            }
689    
690            protected String getModelClassName() {
691                    return Phone.class.getName();
692            }
693    
694            /**
695             * Performs a SQL query.
696             *
697             * @param sql the sql query
698             */
699            protected void runSQL(String sql) {
700                    try {
701                            DataSource dataSource = phonePersistence.getDataSource();
702    
703                            DB db = DBFactoryUtil.getDB();
704    
705                            sql = db.buildSQL(sql);
706                            sql = PortalUtil.transformSQL(sql);
707    
708                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
709                                            sql, new int[0]);
710    
711                            sqlUpdate.update();
712                    }
713                    catch (Exception e) {
714                            throw new SystemException(e);
715                    }
716            }
717    
718            @BeanReference(type = PhoneLocalService.class)
719            protected PhoneLocalService phoneLocalService;
720            @BeanReference(type = com.liferay.portal.service.PhoneService.class)
721            protected com.liferay.portal.service.PhoneService phoneService;
722            @BeanReference(type = PhonePersistence.class)
723            protected PhonePersistence phonePersistence;
724            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
725            protected com.liferay.counter.service.CounterLocalService counterLocalService;
726            @BeanReference(type = com.liferay.portal.service.ClassNameLocalService.class)
727            protected com.liferay.portal.service.ClassNameLocalService classNameLocalService;
728            @BeanReference(type = com.liferay.portal.service.ClassNameService.class)
729            protected com.liferay.portal.service.ClassNameService classNameService;
730            @BeanReference(type = ClassNamePersistence.class)
731            protected ClassNamePersistence classNamePersistence;
732            @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
733            protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
734            @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
735            protected com.liferay.portal.service.ListTypeService listTypeService;
736            @BeanReference(type = ListTypePersistence.class)
737            protected ListTypePersistence listTypePersistence;
738            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
739            protected com.liferay.portal.service.UserLocalService userLocalService;
740            @BeanReference(type = com.liferay.portal.service.UserService.class)
741            protected com.liferay.portal.service.UserService userService;
742            @BeanReference(type = UserPersistence.class)
743            protected UserPersistence userPersistence;
744            @BeanReference(type = UserFinder.class)
745            protected UserFinder userFinder;
746            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
747            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
748            private String _beanIdentifier;
749    }