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