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