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