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.dao.db.DB;
021    import com.liferay.portal.kernel.dao.db.DBFactoryUtil;
022    import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
023    import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
024    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
026    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
027    import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
028    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
029    import com.liferay.portal.kernel.dao.orm.Projection;
030    import com.liferay.portal.kernel.exception.PortalException;
031    import com.liferay.portal.kernel.exception.SystemException;
032    import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
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.Organization;
037    import com.liferay.portal.model.PersistedModel;
038    import com.liferay.portal.service.BaseLocalServiceImpl;
039    import com.liferay.portal.service.OrganizationLocalService;
040    import com.liferay.portal.service.PersistedModelLocalServiceRegistry;
041    import com.liferay.portal.service.persistence.AddressPersistence;
042    import com.liferay.portal.service.persistence.CompanyPersistence;
043    import com.liferay.portal.service.persistence.CountryPersistence;
044    import com.liferay.portal.service.persistence.EmailAddressPersistence;
045    import com.liferay.portal.service.persistence.GroupFinder;
046    import com.liferay.portal.service.persistence.GroupPersistence;
047    import com.liferay.portal.service.persistence.ListTypePersistence;
048    import com.liferay.portal.service.persistence.OrganizationFinder;
049    import com.liferay.portal.service.persistence.OrganizationPersistence;
050    import com.liferay.portal.service.persistence.PasswordPolicyFinder;
051    import com.liferay.portal.service.persistence.PasswordPolicyPersistence;
052    import com.liferay.portal.service.persistence.PasswordPolicyRelPersistence;
053    import com.liferay.portal.service.persistence.PhonePersistence;
054    import com.liferay.portal.service.persistence.RegionPersistence;
055    import com.liferay.portal.service.persistence.RoleFinder;
056    import com.liferay.portal.service.persistence.RolePersistence;
057    import com.liferay.portal.service.persistence.UserFinder;
058    import com.liferay.portal.service.persistence.UserGroupRoleFinder;
059    import com.liferay.portal.service.persistence.UserGroupRolePersistence;
060    import com.liferay.portal.service.persistence.UserPersistence;
061    import com.liferay.portal.service.persistence.WebsitePersistence;
062    import com.liferay.portal.util.PortalUtil;
063    
064    import com.liferay.portlet.asset.service.persistence.AssetCategoryFinder;
065    import com.liferay.portlet.asset.service.persistence.AssetCategoryPersistence;
066    import com.liferay.portlet.asset.service.persistence.AssetEntryFinder;
067    import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence;
068    import com.liferay.portlet.asset.service.persistence.AssetTagFinder;
069    import com.liferay.portlet.asset.service.persistence.AssetTagPersistence;
070    import com.liferay.portlet.expando.service.persistence.ExpandoRowPersistence;
071    import com.liferay.portlet.exportimport.lar.ExportImportHelperUtil;
072    import com.liferay.portlet.exportimport.lar.ManifestSummary;
073    import com.liferay.portlet.exportimport.lar.PortletDataContext;
074    import com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil;
075    import com.liferay.portlet.exportimport.lar.StagedModelType;
076    
077    import java.io.Serializable;
078    
079    import java.util.List;
080    
081    import javax.sql.DataSource;
082    
083    /**
084     * Provides the base implementation for the organization local service.
085     *
086     * <p>
087     * 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.OrganizationLocalServiceImpl}.
088     * </p>
089     *
090     * @author Brian Wing Shun Chan
091     * @see com.liferay.portal.service.impl.OrganizationLocalServiceImpl
092     * @see com.liferay.portal.service.OrganizationLocalServiceUtil
093     * @generated
094     */
095    @ProviderType
096    public abstract class OrganizationLocalServiceBaseImpl
097            extends BaseLocalServiceImpl implements OrganizationLocalService,
098                    IdentifiableOSGiService {
099            /*
100             * NOTE FOR DEVELOPERS:
101             *
102             * Never modify or reference this class directly. Always use {@link com.liferay.portal.service.OrganizationLocalServiceUtil} to access the organization local service.
103             */
104    
105            /**
106             * Adds the organization to the database. Also notifies the appropriate model listeners.
107             *
108             * @param organization the organization
109             * @return the organization that was added
110             */
111            @Indexable(type = IndexableType.REINDEX)
112            @Override
113            public Organization addOrganization(Organization organization) {
114                    organization.setNew(true);
115    
116                    return organizationPersistence.update(organization);
117            }
118    
119            /**
120             * Creates a new organization with the primary key. Does not add the organization to the database.
121             *
122             * @param organizationId the primary key for the new organization
123             * @return the new organization
124             */
125            @Override
126            public Organization createOrganization(long organizationId) {
127                    return organizationPersistence.create(organizationId);
128            }
129    
130            /**
131             * Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.
132             *
133             * @param organizationId the primary key of the organization
134             * @return the organization that was removed
135             * @throws PortalException if a organization with the primary key could not be found
136             */
137            @Indexable(type = IndexableType.DELETE)
138            @Override
139            public Organization deleteOrganization(long organizationId)
140                    throws PortalException {
141                    return organizationPersistence.remove(organizationId);
142            }
143    
144            /**
145             * Deletes the organization from the database. Also notifies the appropriate model listeners.
146             *
147             * @param organization the organization
148             * @return the organization that was removed
149             * @throws PortalException
150             */
151            @Indexable(type = IndexableType.DELETE)
152            @Override
153            public Organization deleteOrganization(Organization organization)
154                    throws PortalException {
155                    return organizationPersistence.remove(organization);
156            }
157    
158            @Override
159            public DynamicQuery dynamicQuery() {
160                    Class<?> clazz = getClass();
161    
162                    return DynamicQueryFactoryUtil.forClass(Organization.class,
163                            clazz.getClassLoader());
164            }
165    
166            /**
167             * Performs a dynamic query on the database and returns the matching rows.
168             *
169             * @param dynamicQuery the dynamic query
170             * @return the matching rows
171             */
172            @Override
173            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
174                    return organizationPersistence.findWithDynamicQuery(dynamicQuery);
175            }
176    
177            /**
178             * Performs a dynamic query on the database and returns a range of the matching rows.
179             *
180             * <p>
181             * 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.OrganizationModelImpl}. 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.
182             * </p>
183             *
184             * @param dynamicQuery the dynamic query
185             * @param start the lower bound of the range of model instances
186             * @param end the upper bound of the range of model instances (not inclusive)
187             * @return the range of matching rows
188             */
189            @Override
190            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
191                    int end) {
192                    return organizationPersistence.findWithDynamicQuery(dynamicQuery,
193                            start, end);
194            }
195    
196            /**
197             * Performs a dynamic query on the database and returns an ordered range of the matching rows.
198             *
199             * <p>
200             * 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.OrganizationModelImpl}. 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.
201             * </p>
202             *
203             * @param dynamicQuery the dynamic query
204             * @param start the lower bound of the range of model instances
205             * @param end the upper bound of the range of model instances (not inclusive)
206             * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
207             * @return the ordered range of matching rows
208             */
209            @Override
210            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
211                    int end, OrderByComparator<T> orderByComparator) {
212                    return organizationPersistence.findWithDynamicQuery(dynamicQuery,
213                            start, end, orderByComparator);
214            }
215    
216            /**
217             * Returns the number of rows matching the dynamic query.
218             *
219             * @param dynamicQuery the dynamic query
220             * @return the number of rows matching the dynamic query
221             */
222            @Override
223            public long dynamicQueryCount(DynamicQuery dynamicQuery) {
224                    return organizationPersistence.countWithDynamicQuery(dynamicQuery);
225            }
226    
227            /**
228             * Returns the number of rows matching the dynamic query.
229             *
230             * @param dynamicQuery the dynamic query
231             * @param projection the projection to apply to the query
232             * @return the number of rows matching the dynamic query
233             */
234            @Override
235            public long dynamicQueryCount(DynamicQuery dynamicQuery,
236                    Projection projection) {
237                    return organizationPersistence.countWithDynamicQuery(dynamicQuery,
238                            projection);
239            }
240    
241            @Override
242            public Organization fetchOrganization(long organizationId) {
243                    return organizationPersistence.fetchByPrimaryKey(organizationId);
244            }
245    
246            /**
247             * Returns the organization with the matching UUID and company.
248             *
249             * @param uuid the organization's UUID
250             * @param companyId the primary key of the company
251             * @return the matching organization, or <code>null</code> if a matching organization could not be found
252             */
253            @Override
254            public Organization fetchOrganizationByUuidAndCompanyId(String uuid,
255                    long companyId) {
256                    return organizationPersistence.fetchByUuid_C_First(uuid, companyId, null);
257            }
258    
259            /**
260             * Returns the organization with the primary key.
261             *
262             * @param organizationId the primary key of the organization
263             * @return the organization
264             * @throws PortalException if a organization with the primary key could not be found
265             */
266            @Override
267            public Organization getOrganization(long organizationId)
268                    throws PortalException {
269                    return organizationPersistence.findByPrimaryKey(organizationId);
270            }
271    
272            @Override
273            public ActionableDynamicQuery getActionableDynamicQuery() {
274                    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
275    
276                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.OrganizationLocalServiceUtil.getService());
277                    actionableDynamicQuery.setClass(Organization.class);
278                    actionableDynamicQuery.setClassLoader(getClassLoader());
279    
280                    actionableDynamicQuery.setPrimaryKeyPropertyName("organizationId");
281    
282                    return actionableDynamicQuery;
283            }
284    
285            protected void initActionableDynamicQuery(
286                    ActionableDynamicQuery actionableDynamicQuery) {
287                    actionableDynamicQuery.setBaseLocalService(com.liferay.portal.service.OrganizationLocalServiceUtil.getService());
288                    actionableDynamicQuery.setClass(Organization.class);
289                    actionableDynamicQuery.setClassLoader(getClassLoader());
290    
291                    actionableDynamicQuery.setPrimaryKeyPropertyName("organizationId");
292            }
293    
294            @Override
295            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
296                    final PortletDataContext portletDataContext) {
297                    final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
298                                    @Override
299                                    public long performCount() throws PortalException {
300                                            ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
301    
302                                            StagedModelType stagedModelType = getStagedModelType();
303    
304                                            long modelAdditionCount = super.performCount();
305    
306                                            manifestSummary.addModelAdditionCount(stagedModelType,
307                                                    modelAdditionCount);
308    
309                                            long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
310                                                            stagedModelType);
311    
312                                            manifestSummary.addModelDeletionCount(stagedModelType,
313                                                    modelDeletionCount);
314    
315                                            return modelAdditionCount;
316                                    }
317                            };
318    
319                    initActionableDynamicQuery(exportActionableDynamicQuery);
320    
321                    exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
322                                    @Override
323                                    public void addCriteria(DynamicQuery dynamicQuery) {
324                                            portletDataContext.addDateRangeCriteria(dynamicQuery,
325                                                    "modifiedDate");
326                                    }
327                            });
328    
329                    exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
330    
331                    exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<Organization>() {
332                                    @Override
333                                    public void performAction(Organization organization)
334                                            throws PortalException {
335                                            StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
336                                                    organization);
337                                    }
338                            });
339                    exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
340                                    PortalUtil.getClassNameId(Organization.class.getName())));
341    
342                    return exportActionableDynamicQuery;
343            }
344    
345            /**
346             * @throws PortalException
347             */
348            @Override
349            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
350                    throws PortalException {
351                    return organizationLocalService.deleteOrganization((Organization)persistedModel);
352            }
353    
354            @Override
355            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
356                    throws PortalException {
357                    return organizationPersistence.findByPrimaryKey(primaryKeyObj);
358            }
359    
360            /**
361             * Returns the organization with the matching UUID and company.
362             *
363             * @param uuid the organization's UUID
364             * @param companyId the primary key of the company
365             * @return the matching organization
366             * @throws PortalException if a matching organization could not be found
367             */
368            @Override
369            public Organization getOrganizationByUuidAndCompanyId(String uuid,
370                    long companyId) throws PortalException {
371                    return organizationPersistence.findByUuid_C_First(uuid, companyId, null);
372            }
373    
374            /**
375             * Returns a range of all the organizations.
376             *
377             * <p>
378             * 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.OrganizationModelImpl}. 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.
379             * </p>
380             *
381             * @param start the lower bound of the range of organizations
382             * @param end the upper bound of the range of organizations (not inclusive)
383             * @return the range of organizations
384             */
385            @Override
386            public List<Organization> getOrganizations(int start, int end) {
387                    return organizationPersistence.findAll(start, end);
388            }
389    
390            /**
391             * Returns the number of organizations.
392             *
393             * @return the number of organizations
394             */
395            @Override
396            public int getOrganizationsCount() {
397                    return organizationPersistence.countAll();
398            }
399    
400            /**
401             * Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
402             *
403             * @param organization the organization
404             * @return the organization that was updated
405             */
406            @Indexable(type = IndexableType.REINDEX)
407            @Override
408            public Organization updateOrganization(Organization organization) {
409                    return organizationPersistence.update(organization);
410            }
411    
412            /**
413             */
414            @Override
415            public void addGroupOrganization(long groupId, long organizationId) {
416                    groupPersistence.addOrganization(groupId, organizationId);
417            }
418    
419            /**
420             */
421            @Override
422            public void addGroupOrganization(long groupId, Organization organization) {
423                    groupPersistence.addOrganization(groupId, organization);
424            }
425    
426            /**
427             */
428            @Override
429            public void addGroupOrganizations(long groupId, long[] organizationIds) {
430                    groupPersistence.addOrganizations(groupId, organizationIds);
431            }
432    
433            /**
434             */
435            @Override
436            public void addGroupOrganizations(long groupId,
437                    List<Organization> Organizations) {
438                    groupPersistence.addOrganizations(groupId, Organizations);
439            }
440    
441            /**
442             */
443            @Override
444            public void clearGroupOrganizations(long groupId) {
445                    groupPersistence.clearOrganizations(groupId);
446            }
447    
448            /**
449             */
450            @Override
451            public void deleteGroupOrganization(long groupId, long organizationId) {
452                    groupPersistence.removeOrganization(groupId, organizationId);
453            }
454    
455            /**
456             */
457            @Override
458            public void deleteGroupOrganization(long groupId, Organization organization) {
459                    groupPersistence.removeOrganization(groupId, organization);
460            }
461    
462            /**
463             */
464            @Override
465            public void deleteGroupOrganizations(long groupId, long[] organizationIds) {
466                    groupPersistence.removeOrganizations(groupId, organizationIds);
467            }
468    
469            /**
470             */
471            @Override
472            public void deleteGroupOrganizations(long groupId,
473                    List<Organization> Organizations) {
474                    groupPersistence.removeOrganizations(groupId, Organizations);
475            }
476    
477            /**
478             * Returns the groupIds of the groups associated with the organization.
479             *
480             * @param organizationId the organizationId of the organization
481             * @return long[] the groupIds of groups associated with the organization
482             */
483            @Override
484            public long[] getGroupPrimaryKeys(long organizationId) {
485                    return organizationPersistence.getGroupPrimaryKeys(organizationId);
486            }
487    
488            /**
489             */
490            @Override
491            public List<Organization> getGroupOrganizations(long groupId) {
492                    return groupPersistence.getOrganizations(groupId);
493            }
494    
495            /**
496             */
497            @Override
498            public List<Organization> getGroupOrganizations(long groupId, int start,
499                    int end) {
500                    return groupPersistence.getOrganizations(groupId, start, end);
501            }
502    
503            /**
504             */
505            @Override
506            public List<Organization> getGroupOrganizations(long groupId, int start,
507                    int end, OrderByComparator<Organization> orderByComparator) {
508                    return groupPersistence.getOrganizations(groupId, start, end,
509                            orderByComparator);
510            }
511    
512            /**
513             */
514            @Override
515            public int getGroupOrganizationsCount(long groupId) {
516                    return groupPersistence.getOrganizationsSize(groupId);
517            }
518    
519            /**
520             */
521            @Override
522            public boolean hasGroupOrganization(long groupId, long organizationId) {
523                    return groupPersistence.containsOrganization(groupId, organizationId);
524            }
525    
526            /**
527             */
528            @Override
529            public boolean hasGroupOrganizations(long groupId) {
530                    return groupPersistence.containsOrganizations(groupId);
531            }
532    
533            /**
534             */
535            @Override
536            public void setGroupOrganizations(long groupId, long[] organizationIds) {
537                    groupPersistence.setOrganizations(groupId, organizationIds);
538            }
539    
540            /**
541             */
542            @Override
543            public void addUserOrganization(long userId, long organizationId) {
544                    userPersistence.addOrganization(userId, organizationId);
545            }
546    
547            /**
548             */
549            @Override
550            public void addUserOrganization(long userId, Organization organization) {
551                    userPersistence.addOrganization(userId, organization);
552            }
553    
554            /**
555             */
556            @Override
557            public void addUserOrganizations(long userId, long[] organizationIds) {
558                    userPersistence.addOrganizations(userId, organizationIds);
559            }
560    
561            /**
562             */
563            @Override
564            public void addUserOrganizations(long userId,
565                    List<Organization> Organizations) {
566                    userPersistence.addOrganizations(userId, Organizations);
567            }
568    
569            /**
570             */
571            @Override
572            public void clearUserOrganizations(long userId) {
573                    userPersistence.clearOrganizations(userId);
574            }
575    
576            /**
577             */
578            @Override
579            public void deleteUserOrganization(long userId, long organizationId) {
580                    userPersistence.removeOrganization(userId, organizationId);
581            }
582    
583            /**
584             */
585            @Override
586            public void deleteUserOrganization(long userId, Organization organization) {
587                    userPersistence.removeOrganization(userId, organization);
588            }
589    
590            /**
591             */
592            @Override
593            public void deleteUserOrganizations(long userId, long[] organizationIds) {
594                    userPersistence.removeOrganizations(userId, organizationIds);
595            }
596    
597            /**
598             */
599            @Override
600            public void deleteUserOrganizations(long userId,
601                    List<Organization> Organizations) {
602                    userPersistence.removeOrganizations(userId, Organizations);
603            }
604    
605            /**
606             * Returns the userIds of the users associated with the organization.
607             *
608             * @param organizationId the organizationId of the organization
609             * @return long[] the userIds of users associated with the organization
610             */
611            @Override
612            public long[] getUserPrimaryKeys(long organizationId) {
613                    return organizationPersistence.getUserPrimaryKeys(organizationId);
614            }
615    
616            /**
617             */
618            @Override
619            public List<Organization> getUserOrganizations(long userId) {
620                    return userPersistence.getOrganizations(userId);
621            }
622    
623            /**
624             */
625            @Override
626            public List<Organization> getUserOrganizations(long userId, int start,
627                    int end) {
628                    return userPersistence.getOrganizations(userId, start, end);
629            }
630    
631            /**
632             */
633            @Override
634            public List<Organization> getUserOrganizations(long userId, int start,
635                    int end, OrderByComparator<Organization> orderByComparator) {
636                    return userPersistence.getOrganizations(userId, start, end,
637                            orderByComparator);
638            }
639    
640            /**
641             */
642            @Override
643            public int getUserOrganizationsCount(long userId) {
644                    return userPersistence.getOrganizationsSize(userId);
645            }
646    
647            /**
648             */
649            @Override
650            public boolean hasUserOrganization(long userId, long organizationId) {
651                    return userPersistence.containsOrganization(userId, organizationId);
652            }
653    
654            /**
655             */
656            @Override
657            public boolean hasUserOrganizations(long userId) {
658                    return userPersistence.containsOrganizations(userId);
659            }
660    
661            /**
662             */
663            @Override
664            public void setUserOrganizations(long userId, long[] organizationIds) {
665                    userPersistence.setOrganizations(userId, organizationIds);
666            }
667    
668            /**
669             * Returns the organization local service.
670             *
671             * @return the organization local service
672             */
673            public OrganizationLocalService getOrganizationLocalService() {
674                    return organizationLocalService;
675            }
676    
677            /**
678             * Sets the organization local service.
679             *
680             * @param organizationLocalService the organization local service
681             */
682            public void setOrganizationLocalService(
683                    OrganizationLocalService organizationLocalService) {
684                    this.organizationLocalService = organizationLocalService;
685            }
686    
687            /**
688             * Returns the organization remote service.
689             *
690             * @return the organization remote service
691             */
692            public com.liferay.portal.service.OrganizationService getOrganizationService() {
693                    return organizationService;
694            }
695    
696            /**
697             * Sets the organization remote service.
698             *
699             * @param organizationService the organization remote service
700             */
701            public void setOrganizationService(
702                    com.liferay.portal.service.OrganizationService organizationService) {
703                    this.organizationService = organizationService;
704            }
705    
706            /**
707             * Returns the organization persistence.
708             *
709             * @return the organization persistence
710             */
711            public OrganizationPersistence getOrganizationPersistence() {
712                    return organizationPersistence;
713            }
714    
715            /**
716             * Sets the organization persistence.
717             *
718             * @param organizationPersistence the organization persistence
719             */
720            public void setOrganizationPersistence(
721                    OrganizationPersistence organizationPersistence) {
722                    this.organizationPersistence = organizationPersistence;
723            }
724    
725            /**
726             * Returns the organization finder.
727             *
728             * @return the organization finder
729             */
730            public OrganizationFinder getOrganizationFinder() {
731                    return organizationFinder;
732            }
733    
734            /**
735             * Sets the organization finder.
736             *
737             * @param organizationFinder the organization finder
738             */
739            public void setOrganizationFinder(OrganizationFinder organizationFinder) {
740                    this.organizationFinder = organizationFinder;
741            }
742    
743            /**
744             * Returns the counter local service.
745             *
746             * @return the counter local service
747             */
748            public com.liferay.counter.service.CounterLocalService getCounterLocalService() {
749                    return counterLocalService;
750            }
751    
752            /**
753             * Sets the counter local service.
754             *
755             * @param counterLocalService the counter local service
756             */
757            public void setCounterLocalService(
758                    com.liferay.counter.service.CounterLocalService counterLocalService) {
759                    this.counterLocalService = counterLocalService;
760            }
761    
762            /**
763             * Returns the address local service.
764             *
765             * @return the address local service
766             */
767            public com.liferay.portal.service.AddressLocalService getAddressLocalService() {
768                    return addressLocalService;
769            }
770    
771            /**
772             * Sets the address local service.
773             *
774             * @param addressLocalService the address local service
775             */
776            public void setAddressLocalService(
777                    com.liferay.portal.service.AddressLocalService addressLocalService) {
778                    this.addressLocalService = addressLocalService;
779            }
780    
781            /**
782             * Returns the address remote service.
783             *
784             * @return the address remote service
785             */
786            public com.liferay.portal.service.AddressService getAddressService() {
787                    return addressService;
788            }
789    
790            /**
791             * Sets the address remote service.
792             *
793             * @param addressService the address remote service
794             */
795            public void setAddressService(
796                    com.liferay.portal.service.AddressService addressService) {
797                    this.addressService = addressService;
798            }
799    
800            /**
801             * Returns the address persistence.
802             *
803             * @return the address persistence
804             */
805            public AddressPersistence getAddressPersistence() {
806                    return addressPersistence;
807            }
808    
809            /**
810             * Sets the address persistence.
811             *
812             * @param addressPersistence the address persistence
813             */
814            public void setAddressPersistence(AddressPersistence addressPersistence) {
815                    this.addressPersistence = addressPersistence;
816            }
817    
818            /**
819             * Returns the company local service.
820             *
821             * @return the company local service
822             */
823            public com.liferay.portal.service.CompanyLocalService getCompanyLocalService() {
824                    return companyLocalService;
825            }
826    
827            /**
828             * Sets the company local service.
829             *
830             * @param companyLocalService the company local service
831             */
832            public void setCompanyLocalService(
833                    com.liferay.portal.service.CompanyLocalService companyLocalService) {
834                    this.companyLocalService = companyLocalService;
835            }
836    
837            /**
838             * Returns the company remote service.
839             *
840             * @return the company remote service
841             */
842            public com.liferay.portal.service.CompanyService getCompanyService() {
843                    return companyService;
844            }
845    
846            /**
847             * Sets the company remote service.
848             *
849             * @param companyService the company remote service
850             */
851            public void setCompanyService(
852                    com.liferay.portal.service.CompanyService companyService) {
853                    this.companyService = companyService;
854            }
855    
856            /**
857             * Returns the company persistence.
858             *
859             * @return the company persistence
860             */
861            public CompanyPersistence getCompanyPersistence() {
862                    return companyPersistence;
863            }
864    
865            /**
866             * Sets the company persistence.
867             *
868             * @param companyPersistence the company persistence
869             */
870            public void setCompanyPersistence(CompanyPersistence companyPersistence) {
871                    this.companyPersistence = companyPersistence;
872            }
873    
874            /**
875             * Returns the country remote service.
876             *
877             * @return the country remote service
878             */
879            public com.liferay.portal.service.CountryService getCountryService() {
880                    return countryService;
881            }
882    
883            /**
884             * Sets the country remote service.
885             *
886             * @param countryService the country remote service
887             */
888            public void setCountryService(
889                    com.liferay.portal.service.CountryService countryService) {
890                    this.countryService = countryService;
891            }
892    
893            /**
894             * Returns the country persistence.
895             *
896             * @return the country persistence
897             */
898            public CountryPersistence getCountryPersistence() {
899                    return countryPersistence;
900            }
901    
902            /**
903             * Sets the country persistence.
904             *
905             * @param countryPersistence the country persistence
906             */
907            public void setCountryPersistence(CountryPersistence countryPersistence) {
908                    this.countryPersistence = countryPersistence;
909            }
910    
911            /**
912             * Returns the email address local service.
913             *
914             * @return the email address local service
915             */
916            public com.liferay.portal.service.EmailAddressLocalService getEmailAddressLocalService() {
917                    return emailAddressLocalService;
918            }
919    
920            /**
921             * Sets the email address local service.
922             *
923             * @param emailAddressLocalService the email address local service
924             */
925            public void setEmailAddressLocalService(
926                    com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService) {
927                    this.emailAddressLocalService = emailAddressLocalService;
928            }
929    
930            /**
931             * Returns the email address remote service.
932             *
933             * @return the email address remote service
934             */
935            public com.liferay.portal.service.EmailAddressService getEmailAddressService() {
936                    return emailAddressService;
937            }
938    
939            /**
940             * Sets the email address remote service.
941             *
942             * @param emailAddressService the email address remote service
943             */
944            public void setEmailAddressService(
945                    com.liferay.portal.service.EmailAddressService emailAddressService) {
946                    this.emailAddressService = emailAddressService;
947            }
948    
949            /**
950             * Returns the email address persistence.
951             *
952             * @return the email address persistence
953             */
954            public EmailAddressPersistence getEmailAddressPersistence() {
955                    return emailAddressPersistence;
956            }
957    
958            /**
959             * Sets the email address persistence.
960             *
961             * @param emailAddressPersistence the email address persistence
962             */
963            public void setEmailAddressPersistence(
964                    EmailAddressPersistence emailAddressPersistence) {
965                    this.emailAddressPersistence = emailAddressPersistence;
966            }
967    
968            /**
969             * Returns the group local service.
970             *
971             * @return the group local service
972             */
973            public com.liferay.portal.service.GroupLocalService getGroupLocalService() {
974                    return groupLocalService;
975            }
976    
977            /**
978             * Sets the group local service.
979             *
980             * @param groupLocalService the group local service
981             */
982            public void setGroupLocalService(
983                    com.liferay.portal.service.GroupLocalService groupLocalService) {
984                    this.groupLocalService = groupLocalService;
985            }
986    
987            /**
988             * Returns the group remote service.
989             *
990             * @return the group remote service
991             */
992            public com.liferay.portal.service.GroupService getGroupService() {
993                    return groupService;
994            }
995    
996            /**
997             * Sets the group remote service.
998             *
999             * @param groupService the group remote service
1000             */
1001            public void setGroupService(
1002                    com.liferay.portal.service.GroupService groupService) {
1003                    this.groupService = groupService;
1004            }
1005    
1006            /**
1007             * Returns the group persistence.
1008             *
1009             * @return the group persistence
1010             */
1011            public GroupPersistence getGroupPersistence() {
1012                    return groupPersistence;
1013            }
1014    
1015            /**
1016             * Sets the group persistence.
1017             *
1018             * @param groupPersistence the group persistence
1019             */
1020            public void setGroupPersistence(GroupPersistence groupPersistence) {
1021                    this.groupPersistence = groupPersistence;
1022            }
1023    
1024            /**
1025             * Returns the group finder.
1026             *
1027             * @return the group finder
1028             */
1029            public GroupFinder getGroupFinder() {
1030                    return groupFinder;
1031            }
1032    
1033            /**
1034             * Sets the group finder.
1035             *
1036             * @param groupFinder the group finder
1037             */
1038            public void setGroupFinder(GroupFinder groupFinder) {
1039                    this.groupFinder = groupFinder;
1040            }
1041    
1042            /**
1043             * Returns the list type local service.
1044             *
1045             * @return the list type local service
1046             */
1047            public com.liferay.portal.service.ListTypeLocalService getListTypeLocalService() {
1048                    return listTypeLocalService;
1049            }
1050    
1051            /**
1052             * Sets the list type local service.
1053             *
1054             * @param listTypeLocalService the list type local service
1055             */
1056            public void setListTypeLocalService(
1057                    com.liferay.portal.service.ListTypeLocalService listTypeLocalService) {
1058                    this.listTypeLocalService = listTypeLocalService;
1059            }
1060    
1061            /**
1062             * Returns the list type remote service.
1063             *
1064             * @return the list type remote service
1065             */
1066            public com.liferay.portal.service.ListTypeService getListTypeService() {
1067                    return listTypeService;
1068            }
1069    
1070            /**
1071             * Sets the list type remote service.
1072             *
1073             * @param listTypeService the list type remote service
1074             */
1075            public void setListTypeService(
1076                    com.liferay.portal.service.ListTypeService listTypeService) {
1077                    this.listTypeService = listTypeService;
1078            }
1079    
1080            /**
1081             * Returns the list type persistence.
1082             *
1083             * @return the list type persistence
1084             */
1085            public ListTypePersistence getListTypePersistence() {
1086                    return listTypePersistence;
1087            }
1088    
1089            /**
1090             * Sets the list type persistence.
1091             *
1092             * @param listTypePersistence the list type persistence
1093             */
1094            public void setListTypePersistence(ListTypePersistence listTypePersistence) {
1095                    this.listTypePersistence = listTypePersistence;
1096            }
1097    
1098            /**
1099             * Returns the asset category local service.
1100             *
1101             * @return the asset category local service
1102             */
1103            public com.liferay.portlet.asset.service.AssetCategoryLocalService getAssetCategoryLocalService() {
1104                    return assetCategoryLocalService;
1105            }
1106    
1107            /**
1108             * Sets the asset category local service.
1109             *
1110             * @param assetCategoryLocalService the asset category local service
1111             */
1112            public void setAssetCategoryLocalService(
1113                    com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService) {
1114                    this.assetCategoryLocalService = assetCategoryLocalService;
1115            }
1116    
1117            /**
1118             * Returns the asset category remote service.
1119             *
1120             * @return the asset category remote service
1121             */
1122            public com.liferay.portlet.asset.service.AssetCategoryService getAssetCategoryService() {
1123                    return assetCategoryService;
1124            }
1125    
1126            /**
1127             * Sets the asset category remote service.
1128             *
1129             * @param assetCategoryService the asset category remote service
1130             */
1131            public void setAssetCategoryService(
1132                    com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService) {
1133                    this.assetCategoryService = assetCategoryService;
1134            }
1135    
1136            /**
1137             * Returns the asset category persistence.
1138             *
1139             * @return the asset category persistence
1140             */
1141            public AssetCategoryPersistence getAssetCategoryPersistence() {
1142                    return assetCategoryPersistence;
1143            }
1144    
1145            /**
1146             * Sets the asset category persistence.
1147             *
1148             * @param assetCategoryPersistence the asset category persistence
1149             */
1150            public void setAssetCategoryPersistence(
1151                    AssetCategoryPersistence assetCategoryPersistence) {
1152                    this.assetCategoryPersistence = assetCategoryPersistence;
1153            }
1154    
1155            /**
1156             * Returns the asset category finder.
1157             *
1158             * @return the asset category finder
1159             */
1160            public AssetCategoryFinder getAssetCategoryFinder() {
1161                    return assetCategoryFinder;
1162            }
1163    
1164            /**
1165             * Sets the asset category finder.
1166             *
1167             * @param assetCategoryFinder the asset category finder
1168             */
1169            public void setAssetCategoryFinder(AssetCategoryFinder assetCategoryFinder) {
1170                    this.assetCategoryFinder = assetCategoryFinder;
1171            }
1172    
1173            /**
1174             * Returns the asset entry local service.
1175             *
1176             * @return the asset entry local service
1177             */
1178            public com.liferay.portlet.asset.service.AssetEntryLocalService getAssetEntryLocalService() {
1179                    return assetEntryLocalService;
1180            }
1181    
1182            /**
1183             * Sets the asset entry local service.
1184             *
1185             * @param assetEntryLocalService the asset entry local service
1186             */
1187            public void setAssetEntryLocalService(
1188                    com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService) {
1189                    this.assetEntryLocalService = assetEntryLocalService;
1190            }
1191    
1192            /**
1193             * Returns the asset entry remote service.
1194             *
1195             * @return the asset entry remote service
1196             */
1197            public com.liferay.portlet.asset.service.AssetEntryService getAssetEntryService() {
1198                    return assetEntryService;
1199            }
1200    
1201            /**
1202             * Sets the asset entry remote service.
1203             *
1204             * @param assetEntryService the asset entry remote service
1205             */
1206            public void setAssetEntryService(
1207                    com.liferay.portlet.asset.service.AssetEntryService assetEntryService) {
1208                    this.assetEntryService = assetEntryService;
1209            }
1210    
1211            /**
1212             * Returns the asset entry persistence.
1213             *
1214             * @return the asset entry persistence
1215             */
1216            public AssetEntryPersistence getAssetEntryPersistence() {
1217                    return assetEntryPersistence;
1218            }
1219    
1220            /**
1221             * Sets the asset entry persistence.
1222             *
1223             * @param assetEntryPersistence the asset entry persistence
1224             */
1225            public void setAssetEntryPersistence(
1226                    AssetEntryPersistence assetEntryPersistence) {
1227                    this.assetEntryPersistence = assetEntryPersistence;
1228            }
1229    
1230            /**
1231             * Returns the asset entry finder.
1232             *
1233             * @return the asset entry finder
1234             */
1235            public AssetEntryFinder getAssetEntryFinder() {
1236                    return assetEntryFinder;
1237            }
1238    
1239            /**
1240             * Sets the asset entry finder.
1241             *
1242             * @param assetEntryFinder the asset entry finder
1243             */
1244            public void setAssetEntryFinder(AssetEntryFinder assetEntryFinder) {
1245                    this.assetEntryFinder = assetEntryFinder;
1246            }
1247    
1248            /**
1249             * Returns the asset tag local service.
1250             *
1251             * @return the asset tag local service
1252             */
1253            public com.liferay.portlet.asset.service.AssetTagLocalService getAssetTagLocalService() {
1254                    return assetTagLocalService;
1255            }
1256    
1257            /**
1258             * Sets the asset tag local service.
1259             *
1260             * @param assetTagLocalService the asset tag local service
1261             */
1262            public void setAssetTagLocalService(
1263                    com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService) {
1264                    this.assetTagLocalService = assetTagLocalService;
1265            }
1266    
1267            /**
1268             * Returns the asset tag remote service.
1269             *
1270             * @return the asset tag remote service
1271             */
1272            public com.liferay.portlet.asset.service.AssetTagService getAssetTagService() {
1273                    return assetTagService;
1274            }
1275    
1276            /**
1277             * Sets the asset tag remote service.
1278             *
1279             * @param assetTagService the asset tag remote service
1280             */
1281            public void setAssetTagService(
1282                    com.liferay.portlet.asset.service.AssetTagService assetTagService) {
1283                    this.assetTagService = assetTagService;
1284            }
1285    
1286            /**
1287             * Returns the asset tag persistence.
1288             *
1289             * @return the asset tag persistence
1290             */
1291            public AssetTagPersistence getAssetTagPersistence() {
1292                    return assetTagPersistence;
1293            }
1294    
1295            /**
1296             * Sets the asset tag persistence.
1297             *
1298             * @param assetTagPersistence the asset tag persistence
1299             */
1300            public void setAssetTagPersistence(AssetTagPersistence assetTagPersistence) {
1301                    this.assetTagPersistence = assetTagPersistence;
1302            }
1303    
1304            /**
1305             * Returns the asset tag finder.
1306             *
1307             * @return the asset tag finder
1308             */
1309            public AssetTagFinder getAssetTagFinder() {
1310                    return assetTagFinder;
1311            }
1312    
1313            /**
1314             * Sets the asset tag finder.
1315             *
1316             * @param assetTagFinder the asset tag finder
1317             */
1318            public void setAssetTagFinder(AssetTagFinder assetTagFinder) {
1319                    this.assetTagFinder = assetTagFinder;
1320            }
1321    
1322            /**
1323             * Returns the expando row local service.
1324             *
1325             * @return the expando row local service
1326             */
1327            public com.liferay.portlet.expando.service.ExpandoRowLocalService getExpandoRowLocalService() {
1328                    return expandoRowLocalService;
1329            }
1330    
1331            /**
1332             * Sets the expando row local service.
1333             *
1334             * @param expandoRowLocalService the expando row local service
1335             */
1336            public void setExpandoRowLocalService(
1337                    com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService) {
1338                    this.expandoRowLocalService = expandoRowLocalService;
1339            }
1340    
1341            /**
1342             * Returns the expando row persistence.
1343             *
1344             * @return the expando row persistence
1345             */
1346            public ExpandoRowPersistence getExpandoRowPersistence() {
1347                    return expandoRowPersistence;
1348            }
1349    
1350            /**
1351             * Sets the expando row persistence.
1352             *
1353             * @param expandoRowPersistence the expando row persistence
1354             */
1355            public void setExpandoRowPersistence(
1356                    ExpandoRowPersistence expandoRowPersistence) {
1357                    this.expandoRowPersistence = expandoRowPersistence;
1358            }
1359    
1360            /**
1361             * Returns the password policy local service.
1362             *
1363             * @return the password policy local service
1364             */
1365            public com.liferay.portal.service.PasswordPolicyLocalService getPasswordPolicyLocalService() {
1366                    return passwordPolicyLocalService;
1367            }
1368    
1369            /**
1370             * Sets the password policy local service.
1371             *
1372             * @param passwordPolicyLocalService the password policy local service
1373             */
1374            public void setPasswordPolicyLocalService(
1375                    com.liferay.portal.service.PasswordPolicyLocalService passwordPolicyLocalService) {
1376                    this.passwordPolicyLocalService = passwordPolicyLocalService;
1377            }
1378    
1379            /**
1380             * Returns the password policy remote service.
1381             *
1382             * @return the password policy remote service
1383             */
1384            public com.liferay.portal.service.PasswordPolicyService getPasswordPolicyService() {
1385                    return passwordPolicyService;
1386            }
1387    
1388            /**
1389             * Sets the password policy remote service.
1390             *
1391             * @param passwordPolicyService the password policy remote service
1392             */
1393            public void setPasswordPolicyService(
1394                    com.liferay.portal.service.PasswordPolicyService passwordPolicyService) {
1395                    this.passwordPolicyService = passwordPolicyService;
1396            }
1397    
1398            /**
1399             * Returns the password policy persistence.
1400             *
1401             * @return the password policy persistence
1402             */
1403            public PasswordPolicyPersistence getPasswordPolicyPersistence() {
1404                    return passwordPolicyPersistence;
1405            }
1406    
1407            /**
1408             * Sets the password policy persistence.
1409             *
1410             * @param passwordPolicyPersistence the password policy persistence
1411             */
1412            public void setPasswordPolicyPersistence(
1413                    PasswordPolicyPersistence passwordPolicyPersistence) {
1414                    this.passwordPolicyPersistence = passwordPolicyPersistence;
1415            }
1416    
1417            /**
1418             * Returns the password policy finder.
1419             *
1420             * @return the password policy finder
1421             */
1422            public PasswordPolicyFinder getPasswordPolicyFinder() {
1423                    return passwordPolicyFinder;
1424            }
1425    
1426            /**
1427             * Sets the password policy finder.
1428             *
1429             * @param passwordPolicyFinder the password policy finder
1430             */
1431            public void setPasswordPolicyFinder(
1432                    PasswordPolicyFinder passwordPolicyFinder) {
1433                    this.passwordPolicyFinder = passwordPolicyFinder;
1434            }
1435    
1436            /**
1437             * Returns the password policy rel local service.
1438             *
1439             * @return the password policy rel local service
1440             */
1441            public com.liferay.portal.service.PasswordPolicyRelLocalService getPasswordPolicyRelLocalService() {
1442                    return passwordPolicyRelLocalService;
1443            }
1444    
1445            /**
1446             * Sets the password policy rel local service.
1447             *
1448             * @param passwordPolicyRelLocalService the password policy rel local service
1449             */
1450            public void setPasswordPolicyRelLocalService(
1451                    com.liferay.portal.service.PasswordPolicyRelLocalService passwordPolicyRelLocalService) {
1452                    this.passwordPolicyRelLocalService = passwordPolicyRelLocalService;
1453            }
1454    
1455            /**
1456             * Returns the password policy rel persistence.
1457             *
1458             * @return the password policy rel persistence
1459             */
1460            public PasswordPolicyRelPersistence getPasswordPolicyRelPersistence() {
1461                    return passwordPolicyRelPersistence;
1462            }
1463    
1464            /**
1465             * Sets the password policy rel persistence.
1466             *
1467             * @param passwordPolicyRelPersistence the password policy rel persistence
1468             */
1469            public void setPasswordPolicyRelPersistence(
1470                    PasswordPolicyRelPersistence passwordPolicyRelPersistence) {
1471                    this.passwordPolicyRelPersistence = passwordPolicyRelPersistence;
1472            }
1473    
1474            /**
1475             * Returns the phone local service.
1476             *
1477             * @return the phone local service
1478             */
1479            public com.liferay.portal.service.PhoneLocalService getPhoneLocalService() {
1480                    return phoneLocalService;
1481            }
1482    
1483            /**
1484             * Sets the phone local service.
1485             *
1486             * @param phoneLocalService the phone local service
1487             */
1488            public void setPhoneLocalService(
1489                    com.liferay.portal.service.PhoneLocalService phoneLocalService) {
1490                    this.phoneLocalService = phoneLocalService;
1491            }
1492    
1493            /**
1494             * Returns the phone remote service.
1495             *
1496             * @return the phone remote service
1497             */
1498            public com.liferay.portal.service.PhoneService getPhoneService() {
1499                    return phoneService;
1500            }
1501    
1502            /**
1503             * Sets the phone remote service.
1504             *
1505             * @param phoneService the phone remote service
1506             */
1507            public void setPhoneService(
1508                    com.liferay.portal.service.PhoneService phoneService) {
1509                    this.phoneService = phoneService;
1510            }
1511    
1512            /**
1513             * Returns the phone persistence.
1514             *
1515             * @return the phone persistence
1516             */
1517            public PhonePersistence getPhonePersistence() {
1518                    return phonePersistence;
1519            }
1520    
1521            /**
1522             * Sets the phone persistence.
1523             *
1524             * @param phonePersistence the phone persistence
1525             */
1526            public void setPhonePersistence(PhonePersistence phonePersistence) {
1527                    this.phonePersistence = phonePersistence;
1528            }
1529    
1530            /**
1531             * Returns the region remote service.
1532             *
1533             * @return the region remote service
1534             */
1535            public com.liferay.portal.service.RegionService getRegionService() {
1536                    return regionService;
1537            }
1538    
1539            /**
1540             * Sets the region remote service.
1541             *
1542             * @param regionService the region remote service
1543             */
1544            public void setRegionService(
1545                    com.liferay.portal.service.RegionService regionService) {
1546                    this.regionService = regionService;
1547            }
1548    
1549            /**
1550             * Returns the region persistence.
1551             *
1552             * @return the region persistence
1553             */
1554            public RegionPersistence getRegionPersistence() {
1555                    return regionPersistence;
1556            }
1557    
1558            /**
1559             * Sets the region persistence.
1560             *
1561             * @param regionPersistence the region persistence
1562             */
1563            public void setRegionPersistence(RegionPersistence regionPersistence) {
1564                    this.regionPersistence = regionPersistence;
1565            }
1566    
1567            /**
1568             * Returns the resource local service.
1569             *
1570             * @return the resource local service
1571             */
1572            public com.liferay.portal.service.ResourceLocalService getResourceLocalService() {
1573                    return resourceLocalService;
1574            }
1575    
1576            /**
1577             * Sets the resource local service.
1578             *
1579             * @param resourceLocalService the resource local service
1580             */
1581            public void setResourceLocalService(
1582                    com.liferay.portal.service.ResourceLocalService resourceLocalService) {
1583                    this.resourceLocalService = resourceLocalService;
1584            }
1585    
1586            /**
1587             * Returns the role local service.
1588             *
1589             * @return the role local service
1590             */
1591            public com.liferay.portal.service.RoleLocalService getRoleLocalService() {
1592                    return roleLocalService;
1593            }
1594    
1595            /**
1596             * Sets the role local service.
1597             *
1598             * @param roleLocalService the role local service
1599             */
1600            public void setRoleLocalService(
1601                    com.liferay.portal.service.RoleLocalService roleLocalService) {
1602                    this.roleLocalService = roleLocalService;
1603            }
1604    
1605            /**
1606             * Returns the role remote service.
1607             *
1608             * @return the role remote service
1609             */
1610            public com.liferay.portal.service.RoleService getRoleService() {
1611                    return roleService;
1612            }
1613    
1614            /**
1615             * Sets the role remote service.
1616             *
1617             * @param roleService the role remote service
1618             */
1619            public void setRoleService(
1620                    com.liferay.portal.service.RoleService roleService) {
1621                    this.roleService = roleService;
1622            }
1623    
1624            /**
1625             * Returns the role persistence.
1626             *
1627             * @return the role persistence
1628             */
1629            public RolePersistence getRolePersistence() {
1630                    return rolePersistence;
1631            }
1632    
1633            /**
1634             * Sets the role persistence.
1635             *
1636             * @param rolePersistence the role persistence
1637             */
1638            public void setRolePersistence(RolePersistence rolePersistence) {
1639                    this.rolePersistence = rolePersistence;
1640            }
1641    
1642            /**
1643             * Returns the role finder.
1644             *
1645             * @return the role finder
1646             */
1647            public RoleFinder getRoleFinder() {
1648                    return roleFinder;
1649            }
1650    
1651            /**
1652             * Sets the role finder.
1653             *
1654             * @param roleFinder the role finder
1655             */
1656            public void setRoleFinder(RoleFinder roleFinder) {
1657                    this.roleFinder = roleFinder;
1658            }
1659    
1660            /**
1661             * Returns the user local service.
1662             *
1663             * @return the user local service
1664             */
1665            public com.liferay.portal.service.UserLocalService getUserLocalService() {
1666                    return userLocalService;
1667            }
1668    
1669            /**
1670             * Sets the user local service.
1671             *
1672             * @param userLocalService the user local service
1673             */
1674            public void setUserLocalService(
1675                    com.liferay.portal.service.UserLocalService userLocalService) {
1676                    this.userLocalService = userLocalService;
1677            }
1678    
1679            /**
1680             * Returns the user remote service.
1681             *
1682             * @return the user remote service
1683             */
1684            public com.liferay.portal.service.UserService getUserService() {
1685                    return userService;
1686            }
1687    
1688            /**
1689             * Sets the user remote service.
1690             *
1691             * @param userService the user remote service
1692             */
1693            public void setUserService(
1694                    com.liferay.portal.service.UserService userService) {
1695                    this.userService = userService;
1696            }
1697    
1698            /**
1699             * Returns the user persistence.
1700             *
1701             * @return the user persistence
1702             */
1703            public UserPersistence getUserPersistence() {
1704                    return userPersistence;
1705            }
1706    
1707            /**
1708             * Sets the user persistence.
1709             *
1710             * @param userPersistence the user persistence
1711             */
1712            public void setUserPersistence(UserPersistence userPersistence) {
1713                    this.userPersistence = userPersistence;
1714            }
1715    
1716            /**
1717             * Returns the user finder.
1718             *
1719             * @return the user finder
1720             */
1721            public UserFinder getUserFinder() {
1722                    return userFinder;
1723            }
1724    
1725            /**
1726             * Sets the user finder.
1727             *
1728             * @param userFinder the user finder
1729             */
1730            public void setUserFinder(UserFinder userFinder) {
1731                    this.userFinder = userFinder;
1732            }
1733    
1734            /**
1735             * Returns the user group role local service.
1736             *
1737             * @return the user group role local service
1738             */
1739            public com.liferay.portal.service.UserGroupRoleLocalService getUserGroupRoleLocalService() {
1740                    return userGroupRoleLocalService;
1741            }
1742    
1743            /**
1744             * Sets the user group role local service.
1745             *
1746             * @param userGroupRoleLocalService the user group role local service
1747             */
1748            public void setUserGroupRoleLocalService(
1749                    com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService) {
1750                    this.userGroupRoleLocalService = userGroupRoleLocalService;
1751            }
1752    
1753            /**
1754             * Returns the user group role remote service.
1755             *
1756             * @return the user group role remote service
1757             */
1758            public com.liferay.portal.service.UserGroupRoleService getUserGroupRoleService() {
1759                    return userGroupRoleService;
1760            }
1761    
1762            /**
1763             * Sets the user group role remote service.
1764             *
1765             * @param userGroupRoleService the user group role remote service
1766             */
1767            public void setUserGroupRoleService(
1768                    com.liferay.portal.service.UserGroupRoleService userGroupRoleService) {
1769                    this.userGroupRoleService = userGroupRoleService;
1770            }
1771    
1772            /**
1773             * Returns the user group role persistence.
1774             *
1775             * @return the user group role persistence
1776             */
1777            public UserGroupRolePersistence getUserGroupRolePersistence() {
1778                    return userGroupRolePersistence;
1779            }
1780    
1781            /**
1782             * Sets the user group role persistence.
1783             *
1784             * @param userGroupRolePersistence the user group role persistence
1785             */
1786            public void setUserGroupRolePersistence(
1787                    UserGroupRolePersistence userGroupRolePersistence) {
1788                    this.userGroupRolePersistence = userGroupRolePersistence;
1789            }
1790    
1791            /**
1792             * Returns the user group role finder.
1793             *
1794             * @return the user group role finder
1795             */
1796            public UserGroupRoleFinder getUserGroupRoleFinder() {
1797                    return userGroupRoleFinder;
1798            }
1799    
1800            /**
1801             * Sets the user group role finder.
1802             *
1803             * @param userGroupRoleFinder the user group role finder
1804             */
1805            public void setUserGroupRoleFinder(UserGroupRoleFinder userGroupRoleFinder) {
1806                    this.userGroupRoleFinder = userGroupRoleFinder;
1807            }
1808    
1809            /**
1810             * Returns the website local service.
1811             *
1812             * @return the website local service
1813             */
1814            public com.liferay.portal.service.WebsiteLocalService getWebsiteLocalService() {
1815                    return websiteLocalService;
1816            }
1817    
1818            /**
1819             * Sets the website local service.
1820             *
1821             * @param websiteLocalService the website local service
1822             */
1823            public void setWebsiteLocalService(
1824                    com.liferay.portal.service.WebsiteLocalService websiteLocalService) {
1825                    this.websiteLocalService = websiteLocalService;
1826            }
1827    
1828            /**
1829             * Returns the website remote service.
1830             *
1831             * @return the website remote service
1832             */
1833            public com.liferay.portal.service.WebsiteService getWebsiteService() {
1834                    return websiteService;
1835            }
1836    
1837            /**
1838             * Sets the website remote service.
1839             *
1840             * @param websiteService the website remote service
1841             */
1842            public void setWebsiteService(
1843                    com.liferay.portal.service.WebsiteService websiteService) {
1844                    this.websiteService = websiteService;
1845            }
1846    
1847            /**
1848             * Returns the website persistence.
1849             *
1850             * @return the website persistence
1851             */
1852            public WebsitePersistence getWebsitePersistence() {
1853                    return websitePersistence;
1854            }
1855    
1856            /**
1857             * Sets the website persistence.
1858             *
1859             * @param websitePersistence the website persistence
1860             */
1861            public void setWebsitePersistence(WebsitePersistence websitePersistence) {
1862                    this.websitePersistence = websitePersistence;
1863            }
1864    
1865            public void afterPropertiesSet() {
1866                    persistedModelLocalServiceRegistry.register("com.liferay.portal.model.Organization",
1867                            organizationLocalService);
1868            }
1869    
1870            public void destroy() {
1871                    persistedModelLocalServiceRegistry.unregister(
1872                            "com.liferay.portal.model.Organization");
1873            }
1874    
1875            /**
1876             * Returns the OSGi service identifier.
1877             *
1878             * @return the OSGi service identifier
1879             */
1880            @Override
1881            public String getOSGiServiceIdentifier() {
1882                    return OrganizationLocalService.class.getName();
1883            }
1884    
1885            protected Class<?> getModelClass() {
1886                    return Organization.class;
1887            }
1888    
1889            protected String getModelClassName() {
1890                    return Organization.class.getName();
1891            }
1892    
1893            /**
1894             * Performs a SQL query.
1895             *
1896             * @param sql the sql query
1897             */
1898            protected void runSQL(String sql) {
1899                    try {
1900                            DataSource dataSource = organizationPersistence.getDataSource();
1901    
1902                            DB db = DBFactoryUtil.getDB();
1903    
1904                            sql = db.buildSQL(sql);
1905                            sql = PortalUtil.transformSQL(sql);
1906    
1907                            SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
1908                                            sql, new int[0]);
1909    
1910                            sqlUpdate.update();
1911                    }
1912                    catch (Exception e) {
1913                            throw new SystemException(e);
1914                    }
1915            }
1916    
1917            @BeanReference(type = com.liferay.portal.service.OrganizationLocalService.class)
1918            protected OrganizationLocalService organizationLocalService;
1919            @BeanReference(type = com.liferay.portal.service.OrganizationService.class)
1920            protected com.liferay.portal.service.OrganizationService organizationService;
1921            @BeanReference(type = OrganizationPersistence.class)
1922            protected OrganizationPersistence organizationPersistence;
1923            @BeanReference(type = OrganizationFinder.class)
1924            protected OrganizationFinder organizationFinder;
1925            @BeanReference(type = com.liferay.counter.service.CounterLocalService.class)
1926            protected com.liferay.counter.service.CounterLocalService counterLocalService;
1927            @BeanReference(type = com.liferay.portal.service.AddressLocalService.class)
1928            protected com.liferay.portal.service.AddressLocalService addressLocalService;
1929            @BeanReference(type = com.liferay.portal.service.AddressService.class)
1930            protected com.liferay.portal.service.AddressService addressService;
1931            @BeanReference(type = AddressPersistence.class)
1932            protected AddressPersistence addressPersistence;
1933            @BeanReference(type = com.liferay.portal.service.CompanyLocalService.class)
1934            protected com.liferay.portal.service.CompanyLocalService companyLocalService;
1935            @BeanReference(type = com.liferay.portal.service.CompanyService.class)
1936            protected com.liferay.portal.service.CompanyService companyService;
1937            @BeanReference(type = CompanyPersistence.class)
1938            protected CompanyPersistence companyPersistence;
1939            @BeanReference(type = com.liferay.portal.service.CountryService.class)
1940            protected com.liferay.portal.service.CountryService countryService;
1941            @BeanReference(type = CountryPersistence.class)
1942            protected CountryPersistence countryPersistence;
1943            @BeanReference(type = com.liferay.portal.service.EmailAddressLocalService.class)
1944            protected com.liferay.portal.service.EmailAddressLocalService emailAddressLocalService;
1945            @BeanReference(type = com.liferay.portal.service.EmailAddressService.class)
1946            protected com.liferay.portal.service.EmailAddressService emailAddressService;
1947            @BeanReference(type = EmailAddressPersistence.class)
1948            protected EmailAddressPersistence emailAddressPersistence;
1949            @BeanReference(type = com.liferay.portal.service.GroupLocalService.class)
1950            protected com.liferay.portal.service.GroupLocalService groupLocalService;
1951            @BeanReference(type = com.liferay.portal.service.GroupService.class)
1952            protected com.liferay.portal.service.GroupService groupService;
1953            @BeanReference(type = GroupPersistence.class)
1954            protected GroupPersistence groupPersistence;
1955            @BeanReference(type = GroupFinder.class)
1956            protected GroupFinder groupFinder;
1957            @BeanReference(type = com.liferay.portal.service.ListTypeLocalService.class)
1958            protected com.liferay.portal.service.ListTypeLocalService listTypeLocalService;
1959            @BeanReference(type = com.liferay.portal.service.ListTypeService.class)
1960            protected com.liferay.portal.service.ListTypeService listTypeService;
1961            @BeanReference(type = ListTypePersistence.class)
1962            protected ListTypePersistence listTypePersistence;
1963            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryLocalService.class)
1964            protected com.liferay.portlet.asset.service.AssetCategoryLocalService assetCategoryLocalService;
1965            @BeanReference(type = com.liferay.portlet.asset.service.AssetCategoryService.class)
1966            protected com.liferay.portlet.asset.service.AssetCategoryService assetCategoryService;
1967            @BeanReference(type = AssetCategoryPersistence.class)
1968            protected AssetCategoryPersistence assetCategoryPersistence;
1969            @BeanReference(type = AssetCategoryFinder.class)
1970            protected AssetCategoryFinder assetCategoryFinder;
1971            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryLocalService.class)
1972            protected com.liferay.portlet.asset.service.AssetEntryLocalService assetEntryLocalService;
1973            @BeanReference(type = com.liferay.portlet.asset.service.AssetEntryService.class)
1974            protected com.liferay.portlet.asset.service.AssetEntryService assetEntryService;
1975            @BeanReference(type = AssetEntryPersistence.class)
1976            protected AssetEntryPersistence assetEntryPersistence;
1977            @BeanReference(type = AssetEntryFinder.class)
1978            protected AssetEntryFinder assetEntryFinder;
1979            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagLocalService.class)
1980            protected com.liferay.portlet.asset.service.AssetTagLocalService assetTagLocalService;
1981            @BeanReference(type = com.liferay.portlet.asset.service.AssetTagService.class)
1982            protected com.liferay.portlet.asset.service.AssetTagService assetTagService;
1983            @BeanReference(type = AssetTagPersistence.class)
1984            protected AssetTagPersistence assetTagPersistence;
1985            @BeanReference(type = AssetTagFinder.class)
1986            protected AssetTagFinder assetTagFinder;
1987            @BeanReference(type = com.liferay.portlet.expando.service.ExpandoRowLocalService.class)
1988            protected com.liferay.portlet.expando.service.ExpandoRowLocalService expandoRowLocalService;
1989            @BeanReference(type = ExpandoRowPersistence.class)
1990            protected ExpandoRowPersistence expandoRowPersistence;
1991            @BeanReference(type = com.liferay.portal.service.PasswordPolicyLocalService.class)
1992            protected com.liferay.portal.service.PasswordPolicyLocalService passwordPolicyLocalService;
1993            @BeanReference(type = com.liferay.portal.service.PasswordPolicyService.class)
1994            protected com.liferay.portal.service.PasswordPolicyService passwordPolicyService;
1995            @BeanReference(type = PasswordPolicyPersistence.class)
1996            protected PasswordPolicyPersistence passwordPolicyPersistence;
1997            @BeanReference(type = PasswordPolicyFinder.class)
1998            protected PasswordPolicyFinder passwordPolicyFinder;
1999            @BeanReference(type = com.liferay.portal.service.PasswordPolicyRelLocalService.class)
2000            protected com.liferay.portal.service.PasswordPolicyRelLocalService passwordPolicyRelLocalService;
2001            @BeanReference(type = PasswordPolicyRelPersistence.class)
2002            protected PasswordPolicyRelPersistence passwordPolicyRelPersistence;
2003            @BeanReference(type = com.liferay.portal.service.PhoneLocalService.class)
2004            protected com.liferay.portal.service.PhoneLocalService phoneLocalService;
2005            @BeanReference(type = com.liferay.portal.service.PhoneService.class)
2006            protected com.liferay.portal.service.PhoneService phoneService;
2007            @BeanReference(type = PhonePersistence.class)
2008            protected PhonePersistence phonePersistence;
2009            @BeanReference(type = com.liferay.portal.service.RegionService.class)
2010            protected com.liferay.portal.service.RegionService regionService;
2011            @BeanReference(type = RegionPersistence.class)
2012            protected RegionPersistence regionPersistence;
2013            @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class)
2014            protected com.liferay.portal.service.ResourceLocalService resourceLocalService;
2015            @BeanReference(type = com.liferay.portal.service.RoleLocalService.class)
2016            protected com.liferay.portal.service.RoleLocalService roleLocalService;
2017            @BeanReference(type = com.liferay.portal.service.RoleService.class)
2018            protected com.liferay.portal.service.RoleService roleService;
2019            @BeanReference(type = RolePersistence.class)
2020            protected RolePersistence rolePersistence;
2021            @BeanReference(type = RoleFinder.class)
2022            protected RoleFinder roleFinder;
2023            @BeanReference(type = com.liferay.portal.service.UserLocalService.class)
2024            protected com.liferay.portal.service.UserLocalService userLocalService;
2025            @BeanReference(type = com.liferay.portal.service.UserService.class)
2026            protected com.liferay.portal.service.UserService userService;
2027            @BeanReference(type = UserPersistence.class)
2028            protected UserPersistence userPersistence;
2029            @BeanReference(type = UserFinder.class)
2030            protected UserFinder userFinder;
2031            @BeanReference(type = com.liferay.portal.service.UserGroupRoleLocalService.class)
2032            protected com.liferay.portal.service.UserGroupRoleLocalService userGroupRoleLocalService;
2033            @BeanReference(type = com.liferay.portal.service.UserGroupRoleService.class)
2034            protected com.liferay.portal.service.UserGroupRoleService userGroupRoleService;
2035            @BeanReference(type = UserGroupRolePersistence.class)
2036            protected UserGroupRolePersistence userGroupRolePersistence;
2037            @BeanReference(type = UserGroupRoleFinder.class)
2038            protected UserGroupRoleFinder userGroupRoleFinder;
2039            @BeanReference(type = com.liferay.portal.service.WebsiteLocalService.class)
2040            protected com.liferay.portal.service.WebsiteLocalService websiteLocalService;
2041            @BeanReference(type = com.liferay.portal.service.WebsiteService.class)
2042            protected com.liferay.portal.service.WebsiteService websiteService;
2043            @BeanReference(type = WebsitePersistence.class)
2044            protected WebsitePersistence websitePersistence;
2045            @BeanReference(type = PersistedModelLocalServiceRegistry.class)
2046            protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
2047    }