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