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 com.liferay.portal.kernel.bean.BeanReference;
018    import com.liferay.portal.kernel.dao.db.DB;
019    import com.liferay.portal.kernel.dao.db.DBManagerUtil;
020    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
021    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
022    import com.liferay.portal.kernel.exception.SystemException;
023    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
024    import com.liferay.portal.model.Contact;
025    import com.liferay.portal.service.BaseServiceImpl;
026    import com.liferay.portal.service.ContactService;
027    import com.liferay.portal.service.persistence.AddressPersistence;
028    import com.liferay.portal.service.persistence.ContactPersistence;
029    import com.liferay.portal.service.persistence.EmailAddressPersistence;
030    import com.liferay.portal.service.persistence.OrganizationFinder;
031    import com.liferay.portal.service.persistence.OrganizationPersistence;
032    import com.liferay.portal.service.persistence.PhonePersistence;
033    import com.liferay.portal.service.persistence.UserFinder;
034    import com.liferay.portal.service.persistence.UserPersistence;
035    import com.liferay.portal.service.persistence.WebsitePersistence;
036    import com.liferay.portal.util.PortalUtil;
037    
038    import javax.sql.DataSource;
039    
040    /**
041     * Provides the base implementation for the contact remote service.
042     *
043     * <p>
044     * 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.ContactServiceImpl}.
045     * </p>
046     *
047     * @author Brian Wing Shun Chan
048     * @see com.liferay.portal.service.impl.ContactServiceImpl
049     * @see com.liferay.portal.service.ContactServiceUtil
050     * @generated
051     */
052    public abstract class ContactServiceBaseImpl extends BaseServiceImpl
053            implements ContactService, IdentifiableOSGiService {
054            /*
055             * NOTE FOR DEVELOPERS:
056             *
057             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.ContactServiceUtil} to access the contact remote service.
058             */
059    
060            /**
061             * Returns the contact local service.
062             *
063             * @return the contact local service
064             */
065            public com.liferay.portal.service.ContactLocalService getContactLocalService() {
066                    return contactLocalService;
067            }
068    
069            /**
070             * Sets the contact local service.
071             *
072             * @param contactLocalService the contact local service
073             */
074            public void setContactLocalService(
075                    com.liferay.portal.service.ContactLocalService contactLocalService) {
076                    this.contactLocalService = contactLocalService;
077            }
078    
079            /**
080             * Returns the contact remote service.
081             *
082             * @return the contact remote service
083             */
084            public ContactService getContactService() {
085                    return contactService;
086            }
087    
088            /**
089             * Sets the contact remote service.
090             *
091             * @param contactService the contact remote service
092             */
093            public void setContactService(ContactService contactService) {
094                    this.contactService = contactService;
095            }
096    
097            /**
098             * Returns the contact persistence.
099             *
100             * @return the contact persistence
101             */
102            public ContactPersistence getContactPersistence() {
103                    return contactPersistence;
104            }
105    
106            /**
107             * Sets the contact persistence.
108             *
109             * @param contactPersistence the contact persistence
110             */
111            public void setContactPersistence(ContactPersistence contactPersistence) {
112                    this.contactPersistence = contactPersistence;
113            }
114    
115            /**
116             * Returns the counter local service.
117             *
118             * @return the counter local service
119             */
120            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
121                    return counterLocalService;
122            }
123    
124            /**
125             * Sets the counter local service.
126             *
127             * @param counterLocalService the counter local service
128             */
129            public void setCounterLocalService(
130                    com.liferay.counter.service.CounterLocalService counterLocalService) {
131                    this.counterLocalService = counterLocalService;
132            }
133    
134            /**
135             * Returns the address local service.
136             *
137             * @return the address local service
138             */
139            public com.liferay.portal.service.AddressLocalService getAddressLocalService() {
140                    return addressLocalService;
141            }
142    
143            /**
144             * Sets the address local service.
145             *
146             * @param addressLocalService the address local service
147             */
148            public void setAddressLocalService(
149                    com.liferay.portal.service.AddressLocalService addressLocalService) {
150                    this.addressLocalService = addressLocalService;
151            }
152    
153            /**
154             * Returns the address remote service.
155             *
156             * @return the address remote service
157             */
158            public com.liferay.portal.service.AddressService getAddressService() {
159                    return addressService;
160            }
161    
162            /**
163             * Sets the address remote service.
164             *
165             * @param addressService the address remote service
166             */
167            public void setAddressService(
168                    com.liferay.portal.service.AddressService addressService) {
169                    this.addressService = addressService;
170            }
171    
172            /**
173             * Returns the address persistence.
174             *
175             * @return the address persistence
176             */
177            public AddressPersistence getAddressPersistence() {
178                    return addressPersistence;
179            }
180    
181            /**
182             * Sets the address persistence.
183             *
184             * @param addressPersistence the address persistence
185             */
186            public void setAddressPersistence(AddressPersistence addressPersistence) {
187                    this.addressPersistence = addressPersistence;
188            }
189    
190            /**
191             * Returns the email address local service.
192             *
193             * @return the email address local service
194             */
195            public com.liferay.portal.service.EmailAddressLocalService getEmailAddressLocalService() {
196                    return emailAddressLocalService;
197            }
198    
199            /**
200             * Sets the email address local service.
201             *
202             * @param emailAddressLocalService the email address local service
203             */
204            public void setEmailAddressLocalService(
205                    com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService) {
206                    this.emailAddressLocalService = emailAddressLocalService;
207            }
208    
209            /**
210             * Returns the email address remote service.
211             *
212             * @return the email address remote service
213             */
214            public com.liferay.portal.service.EmailAddressService getEmailAddressService() {
215                    return emailAddressService;
216            }
217    
218            /**
219             * Sets the email address remote service.
220             *
221             * @param emailAddressService the email address remote service
222             */
223            public void setEmailAddressService(
224                    com.liferay.portal.service.EmailAddressService emailAddressService) {
225                    this.emailAddressService = emailAddressService;
226            }
227    
228            /**
229             * Returns the email address persistence.
230             *
231             * @return the email address persistence
232             */
233            public EmailAddressPersistence getEmailAddressPersistence() {
234                    return emailAddressPersistence;
235            }
236    
237            /**
238             * Sets the email address persistence.
239             *
240             * @param emailAddressPersistence the email address persistence
241             */
242            public void setEmailAddressPersistence(
243                    EmailAddressPersistence emailAddressPersistence) {
244                    this.emailAddressPersistence = emailAddressPersistence;
245            }
246    
247            /**
248             * Returns the organization local service.
249             *
250             * @return the organization local service
251             */
252            public com.liferay.portal.service.OrganizationLocalService getOrganizationLocalService() {
253                    return organizationLocalService;
254            }
255    
256            /**
257             * Sets the organization local service.
258             *
259             * @param organizationLocalService the organization local service
260             */
261            public void setOrganizationLocalService(
262                    com.liferay.portal.service.OrganizationLocalService organizationLocalService) {
263                    this.organizationLocalService = organizationLocalService;
264            }
265    
266            /**
267             * Returns the organization remote service.
268             *
269             * @return the organization remote service
270             */
271            public com.liferay.portal.service.OrganizationService getOrganizationService() {
272                    return organizationService;
273            }
274    
275            /**
276             * Sets the organization remote service.
277             *
278             * @param organizationService the organization remote service
279             */
280            public void setOrganizationService(
281                    com.liferay.portal.service.OrganizationService organizationService) {
282                    this.organizationService = organizationService;
283            }
284    
285            /**
286             * Returns the organization persistence.
287             *
288             * @return the organization persistence
289             */
290            public OrganizationPersistence getOrganizationPersistence() {
291                    return organizationPersistence;
292            }
293    
294            /**
295             * Sets the organization persistence.
296             *
297             * @param organizationPersistence the organization persistence
298             */
299            public void setOrganizationPersistence(
300                    OrganizationPersistence organizationPersistence) {
301                    this.organizationPersistence = organizationPersistence;
302            }
303    
304            /**
305             * Returns the organization finder.
306             *
307             * @return the organization finder
308             */
309            public OrganizationFinder getOrganizationFinder() {
310                    return organizationFinder;
311            }
312    
313            /**
314             * Sets the organization finder.
315             *
316             * @param organizationFinder the organization finder
317             */
318            public void setOrganizationFinder(OrganizationFinder organizationFinder) {
319                    this.organizationFinder = organizationFinder;
320            }
321    
322            /**
323             * Returns the phone local service.
324             *
325             * @return the phone local service
326             */
327            public com.liferay.portal.service.PhoneLocalService getPhoneLocalService() {
328                    return phoneLocalService;
329            }
330    
331            /**
332             * Sets the phone local service.
333             *
334             * @param phoneLocalService the phone local service
335             */
336            public void setPhoneLocalService(
337                    com.liferay.portal.service.PhoneLocalService phoneLocalService) {
338                    this.phoneLocalService = phoneLocalService;
339            }
340    
341            /**
342             * Returns the phone remote service.
343             *
344             * @return the phone remote service
345             */
346            public com.liferay.portal.service.PhoneService getPhoneService() {
347                    return phoneService;
348            }
349    
350            /**
351             * Sets the phone remote service.
352             *
353             * @param phoneService the phone remote service
354             */
355            public void setPhoneService(
356                    com.liferay.portal.service.PhoneService phoneService) {
357                    this.phoneService = phoneService;
358            }
359    
360            /**
361             * Returns the phone persistence.
362             *
363             * @return the phone persistence
364             */
365            public PhonePersistence getPhonePersistence() {
366                    return phonePersistence;
367            }
368    
369            /**
370             * Sets the phone persistence.
371             *
372             * @param phonePersistence the phone persistence
373             */
374            public void setPhonePersistence(PhonePersistence phonePersistence) {
375                    this.phonePersistence = phonePersistence;
376            }
377    
378            /**
379             * Returns the user local service.
380             *
381             * @return the user local service
382             */
383            public com.liferay.portal.service.UserLocalService getUserLocalService() {
384                    return userLocalService;
385            }
386    
387            /**
388             * Sets the user local service.
389             *
390             * @param userLocalService the user local service
391             */
392            public void setUserLocalService(
393                    com.liferay.portal.service.UserLocalService userLocalService) {
394                    this.userLocalService = userLocalService;
395            }
396    
397            /**
398             * Returns the user remote service.
399             *
400             * @return the user remote service
401             */
402            public com.liferay.portal.service.UserService getUserService() {
403                    return userService;
404            }
405    
406            /**
407             * Sets the user remote service.
408             *
409             * @param userService the user remote service
410             */
411            public void setUserService(
412                    com.liferay.portal.service.UserService userService) {
413                    this.userService = userService;
414            }
415    
416            /**
417             * Returns the user persistence.
418             *
419             * @return the user persistence
420             */
421            public UserPersistence getUserPersistence() {
422                    return userPersistence;
423            }
424    
425            /**
426             * Sets the user persistence.
427             *
428             * @param userPersistence the user persistence
429             */
430            public void setUserPersistence(UserPersistence userPersistence) {
431                    this.userPersistence = userPersistence;
432            }
433    
434            /**
435             * Returns the user finder.
436             *
437             * @return the user finder
438             */
439            public UserFinder getUserFinder() {
440                    return userFinder;
441            }
442    
443            /**
444             * Sets the user finder.
445             *
446             * @param userFinder the user finder
447             */
448            public void setUserFinder(UserFinder userFinder) {
449                    this.userFinder = userFinder;
450            }
451    
452            /**
453             * Returns the website local service.
454             *
455             * @return the website local service
456             */
457            public com.liferay.portal.service.WebsiteLocalService getWebsiteLocalService() {
458                    return websiteLocalService;
459            }
460    
461            /**
462             * Sets the website local service.
463             *
464             * @param websiteLocalService the website local service
465             */
466            public void setWebsiteLocalService(
467                    com.liferay.portal.service.WebsiteLocalService websiteLocalService) {
468                    this.websiteLocalService = websiteLocalService;
469            }
470    
471            /**
472             * Returns the website remote service.
473             *
474             * @return the website remote service
475             */
476            public com.liferay.portal.service.WebsiteService getWebsiteService() {
477                    return websiteService;
478            }
479    
480            /**
481             * Sets the website remote service.
482             *
483             * @param websiteService the website remote service
484             */
485            public void setWebsiteService(
486                    com.liferay.portal.service.WebsiteService websiteService) {
487                    this.websiteService = websiteService;
488            }
489    
490            /**
491             * Returns the website persistence.
492             *
493             * @return the website persistence
494             */
495            public WebsitePersistence getWebsitePersistence() {
496                    return websitePersistence;
497            }
498    
499            /**
500             * Sets the website persistence.
501             *
502             * @param websitePersistence the website persistence
503             */
504            public void setWebsitePersistence(WebsitePersistence websitePersistence) {
505                    this.websitePersistence = websitePersistence;
506            }
507    
508            public void afterPropertiesSet() {
509            }
510    
511            public void destroy() {
512            }
513    
514            /**
515             * Returns the OSGi service identifier.
516             *
517             * @return the OSGi service identifier
518             */
519            @Override
520            public String getOSGiServiceIdentifier() {
521                    return ContactService.class.getName();
522            }
523    
524            protected Class<?> getModelClass() {
525                    return Contact.class;
526            }
527    
528            protected String getModelClassName() {
529                    return Contact.class.getName();
530            }
531    
532            /**
533             * Performs a SQL query.
534             *
535             * @param sql the sql query
536             */
537            protected void runSQL(String sql) {
538                    try {
539                            DataSource dataSource = contactPersistence.getDataSource();
540    
541                            DB db = DBManagerUtil.getDB();
542    
543                            sql = db.buildSQL(sql);
544                            sql = PortalUtil.transformSQL(sql);
545    
546                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
547                                            sql, new int[0]);
548    
549                            sqlUpdate.update();
550                    }
551                    catch (Exception e) {
552                            throw new SystemException(e);
553                    }
554            }
555    
556            @BeanReference(type = com.liferay.portal.service.ContactLocalService.class)
557            protected com.liferay.portal.service.ContactLocalService contactLocalService;
558            @BeanReference(type = com.liferay.portal.service.ContactService.class)
559            protected ContactService contactService;
560            @BeanReference(type = ContactPersistence.class)
561            protected ContactPersistence contactPersistence;
562            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
563            protected com.liferay.counter.service.CounterLocalService counterLocalService;
564            @BeanReference(type = com.liferay.portal.service.AddressLocalService.class)
565            protected com.liferay.portal.service.AddressLocalService addressLocalService;
566            @BeanReference(type = com.liferay.portal.service.AddressService.class)
567            protected com.liferay.portal.service.AddressService addressService;
568            @BeanReference(type = AddressPersistence.class)
569            protected AddressPersistence addressPersistence;
570            @BeanReference(type = com.liferay.portal.service.EmailAddressLocalService.class)
571            protected com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService;
572            @BeanReference(type = com.liferay.portal.service.EmailAddressService.class)
573            protected com.liferay.portal.service.EmailAddressService emailAddressService;
574            @BeanReference(type = EmailAddressPersistence.class)
575            protected EmailAddressPersistence emailAddressPersistence;
576            @BeanReference(type = com.liferay.portal.service.OrganizationLocalService.class)
577            protected com.liferay.portal.service.OrganizationLocalService organizationLocalService;
578            @BeanReference(type = com.liferay.portal.service.OrganizationService.class)
579            protected com.liferay.portal.service.OrganizationService organizationService;
580            @BeanReference(type = OrganizationPersistence.class)
581            protected OrganizationPersistence organizationPersistence;
582            @BeanReference(type = OrganizationFinder.class)
583            protected OrganizationFinder organizationFinder;
584            @BeanReference(type = com.liferay.portal.service.PhoneLocalService.class)
585            protected com.liferay.portal.service.PhoneLocalService phoneLocalService;
586            @BeanReference(type = com.liferay.portal.service.PhoneService.class)
587            protected com.liferay.portal.service.PhoneService phoneService;
588            @BeanReference(type = PhonePersistence.class)
589            protected PhonePersistence phonePersistence;
590            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
591            protected com.liferay.portal.service.UserLocalService userLocalService;
592            @BeanReference(type = com.liferay.portal.service.UserService.class)
593            protected com.liferay.portal.service.UserService userService;
594            @BeanReference(type = UserPersistence.class)
595            protected UserPersistence userPersistence;
596            @BeanReference(type = UserFinder.class)
597            protected UserFinder userFinder;
598            @BeanReference(type = com.liferay.portal.service.WebsiteLocalService.class)
599            protected com.liferay.portal.service.WebsiteLocalService websiteLocalService;
600            @BeanReference(type = com.liferay.portal.service.WebsiteService.class)
601            protected com.liferay.portal.service.WebsiteService websiteService;
602            @BeanReference(type = WebsitePersistence.class)
603            protected WebsitePersistence websitePersistence;
604    }