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