Class OrganizationLocalServiceWrapper
- All Implemented Interfaces:
BaseLocalService
,CTService<Organization>
,OrganizationLocalService
,PersistedModelLocalService
,ServiceWrapper<OrganizationLocalService>
OrganizationLocalService
.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
ConstructorsConstructorDescriptionOrganizationLocalServiceWrapper
(OrganizationLocalService organizationLocalService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addGroupOrganization
(long groupId, long organizationId) boolean
addGroupOrganization
(long groupId, Organization organization) boolean
addGroupOrganizations
(long groupId, long[] organizationIds) boolean
addGroupOrganizations
(long groupId, List<Organization> organizations) addOrganization
(long userId, long parentOrganizationId, String name, boolean site) Adds an organization.addOrganization
(Organization organization) Adds the organization to the database.addOrganization
(String externalReferenceCode, long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) Adds an organization.void
addOrganizationResources
(long userId, Organization organization) Adds a resource for each type of permission available on the organization.addOrganizationUserByEmailAddress
(String emailAddress, long organizationId, ServiceContext serviceContext) addOrUpdateOrganization
(String externalReferenceCode, long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, ServiceContext serviceContext) void
addPasswordPolicyOrganizations
(long passwordPolicyId, long[] organizationIds) Assigns the password policy to the organizations, removing any other currently assigned password policies.boolean
addUserOrganization
(long userId, long organizationId) boolean
addUserOrganization
(long userId, Organization organization) void
addUserOrganizationByEmailAddress
(String emailAddress, long organizationId) boolean
addUserOrganizations
(long userId, long[] organizationIds) boolean
addUserOrganizations
(long userId, List<Organization> organizations) void
clearGroupOrganizations
(long groupId) void
clearUserOrganizations
(long userId) createOrganization
(long organizationId) Creates a new organization with the primary key.createPersistedModel
(Serializable primaryKeyObj) void
deleteGroupOrganization
(long groupId, long organizationId) void
deleteGroupOrganization
(long groupId, Organization organization) void
deleteGroupOrganizations
(long groupId, long[] organizationIds) void
deleteGroupOrganizations
(long groupId, List<Organization> organizations) void
deleteLogo
(long organizationId) Deletes the organization's logo.deleteOrganization
(long organizationId) Deletes the organization with the primary key from the database.deleteOrganization
(Organization organization) Deletes the organization from the database.deletePersistedModel
(PersistedModel persistedModel) void
deleteUserOrganization
(long userId, long organizationId) void
deleteUserOrganization
(long userId, Organization organization) void
deleteUserOrganizationByEmailAddress
(String emailAddress, long organizationId) void
deleteUserOrganizations
(long userId, long[] organizationIds) void
deleteUserOrganizations
(long userId, List<Organization> organizations) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end) Performs a dynamic query on the database and returns a range of the matching rows.<T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchOrganization
(long organizationId) fetchOrganization
(long companyId, String name) Returns the organization with the name.fetchOrganizationByExternalReferenceCode
(String externalReferenceCode, long companyId) fetchOrganizationByUuidAndCompanyId
(String uuid, long companyId) Returns the organization with the matching UUID and company.String[]
getChildrenTypes
(String type) getExportActionableDynamicQuery
(PortletDataContext portletDataContext) getGroupOrganizations
(long groupId) getGroupOrganizations
(long groupId, int start, int end) getGroupOrganizations
(long groupId, int start, int end, OrderByComparator<Organization> orderByComparator) int
getGroupOrganizationsCount
(long groupId) long[]
getGroupPrimaryKeys
(long organizationId) Returns the groupIds of the groups associated with the organization.getGroupUserOrganizations
(long groupId, long userId) getOrganization
(long organizationId) Returns the organization with the primary key.getOrganization
(long companyId, String name) Returns the organization with the name.getOrganizationByExternalReferenceCode
(String externalReferenceCode, long companyId) getOrganizationByUuidAndCompanyId
(String uuid, long companyId) Returns the organization with the matching UUID and company.long
getOrganizationId
(long companyId, String name) Returns the primary key of the organization with the name.getOrganizations
(int start, int end) Returns a range of all the organizations.getOrganizations
(long[] organizationIds) Returns the organizations with the primary keys.getOrganizations
(long userId, int start, int end, OrderByComparator<Organization> orderByComparator) getOrganizations
(long companyId, long parentOrganizationId) Returns all the organizations belonging to the parent organization.getOrganizations
(long companyId, long parentOrganizationId, int start, int end) Returns a range of all the organizations belonging to the parent organization.getOrganizations
(long companyId, long parentOrganizationId, String name, int start, int end) getOrganizations
(long companyId, String treePath) getOrganizations
(long companyId, String name, int start, int end, OrderByComparator<Organization> orderByComparator) getOrganizationsAndUsers
(long companyId, long parentOrganizationId, int status, int start, int end, OrderByComparator<?> orderByComparator) Returns all the organizations and users belonging to the parent organization.int
getOrganizationsAndUsersCount
(long companyId, long parentOrganizationId, int status) Returns the number of organizations and users belonging to the parent organization.int
Returns the number of organizations.int
getOrganizationsCount
(long companyId, long parentOrganizationId) Returns the number of organizations belonging to the parent organization.int
getOrganizationsCount
(long companyId, long parentOrganizationId, String name) int
getOrganizationsCount
(long companyId, String name) Returns the OSGi service identifier.getParentOrganizations
(long organizationId) Returns the parent organizations in order by closest ancestor.getPersistedModel
(Serializable primaryKeyObj) getSuborganizations
(long companyId, long organizationId) Returns the suborganizations of the organization.getSuborganizations
(List<Organization> organizations) Returns the suborganizations of the organizations.int
getSuborganizationsCount
(long companyId, long organizationId) Returns the count of suborganizations of the organization.getSubsetOrganizations
(List<Organization> allOrganizations, List<Organization> availableOrganizations) Returns the intersection ofallOrganizations
andavailableOrganizations
.String[]
getTypes()
long[]
getUserOrganizationIds
(long userId, boolean includeAdministrative) Returns all the IDs of organizations with which the user is explicitly associated, optionally including the IDs of organizations that the user administers or owns.getUserOrganizations
(long userId) getUserOrganizations
(long userId, boolean includeAdministrative) Returns all the organizations with which the user is explicitly associated, optionally including the organizations that the user administers or owns.getUserOrganizations
(long userId, int start, int end) getUserOrganizations
(long userId, int start, int end, OrderByComparator<Organization> orderByComparator) int
getUserOrganizationsCount
(long userId) long[]
getUserPrimaryKeys
(long organizationId) Returns the userIds of the users associated with the organization.boolean
hasGroupOrganization
(long groupId, long organizationId) boolean
hasGroupOrganizations
(long groupId) boolean
hasPasswordPolicyOrganization
(long passwordPolicyId, long organizationId) Returnstrue
if the password policy has been assigned to the organization.boolean
hasUserOrganization
(long userId, long organizationId) boolean
hasUserOrganization
(long userId, long organizationId, boolean inheritSuborganizations, boolean includeSpecifiedOrganization) Returnstrue
if the user is a member of the organization, optionally focusing on suborganizations or the specified organization.boolean
hasUserOrganizations
(long userId) boolean
isCountryEnabled
(String type) boolean
isCountryRequired
(String type) boolean
isRootable
(String type) void
rebuildTree
(long companyId) Rebuilds the organization's tree.search
(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params, int start, int end) Returns a name ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer.search
(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Organization> orderByComparator) Returns an ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer.search
(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator, int start, int end) Returns a name ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer.search
(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator, int start, int end, OrderByComparator<Organization> orderByComparator) Returns an ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer.search
(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String, Object> params, boolean andSearch, int start, int end, Sort sort) Returns an ordered range of all the organizations whose name, type, or location fields match the keywords specified for them, using the indexer.search
(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String, Object> params, int start, int end, Sort sort) Returns an ordered range of all the organizations that match the keywords, using the indexer.int
searchCount
(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params) Returns the number of organizations that match the keywords, type, region, and country.int
searchCount
(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator) Returns the number of organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them.searchOrganizations
(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String, Object> params, boolean andSearch, int start, int end, Sort sort) searchOrganizations
(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String, Object> params, int start, int end, Sort sort) searchOrganizationsAndUsers
(long companyId, long parentOrganizationId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) Returns the organizations and users that match the keywords specified for them and belong to the parent organization.int
searchOrganizationsAndUsersCount
(long companyId, long parentOrganizationId, String keywords, int status, LinkedHashMap<String, Object> params) Returns the number of organizations and users that match the keywords specified for them and belong to the parent organization.void
setGroupOrganizations
(long groupId, long[] organizationIds) void
setUserOrganizations
(long userId, long[] organizationIds) void
setWrappedService
(OrganizationLocalService organizationLocalService) void
unsetGroupOrganizations
(long groupId, long[] organizationIds) Removes the organizations from the group.void
unsetPasswordPolicyOrganizations
(long passwordPolicyId, long[] organizationIds) Removes the organizations from the password policy.void
updateAsset
(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames) Updates the organization's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.updateLogo
(long organizationId, byte[] logoBytes) updateOrganization
(Organization organization) Updates the organization in the database or adds it if it does not yet exist.updateOrganization
(String externalReferenceCode, long companyId, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, ServiceContext serviceContext) Updates the organization.<R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<Organization>, R, E> updateUnsafeFunction) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel
-
Constructor Details
-
OrganizationLocalServiceWrapper
public OrganizationLocalServiceWrapper() -
OrganizationLocalServiceWrapper
-
-
Method Details
-
addGroupOrganization
public boolean addGroupOrganization(long groupId, long organizationId) - Specified by:
addGroupOrganization
in interfaceOrganizationLocalService
-
addGroupOrganization
- Specified by:
addGroupOrganization
in interfaceOrganizationLocalService
-
addGroupOrganizations
- Specified by:
addGroupOrganizations
in interfaceOrganizationLocalService
-
addGroupOrganizations
public boolean addGroupOrganizations(long groupId, long[] organizationIds) - Specified by:
addGroupOrganizations
in interfaceOrganizationLocalService
-
addOrganization
public Organization addOrganization(long userId, long parentOrganizationId, String name, boolean site) throws PortalException Adds an organization.This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures. It is not necessary to make a subsequent call to
addOrganizationResources(long, Organization)
.- Specified by:
addOrganization
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the creator/owner of the organizationparentOrganizationId
- the primary key of the organization's parent organizationname
- the organization's namesite
- whether the organization is to be associated with a main site- Returns:
- the organization
- Throws:
PortalException
-
addOrganization
Adds the organization to the database. Also notifies the appropriate model listeners.Important: Inspect OrganizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
addOrganization
in interfaceOrganizationLocalService
- Parameters:
organization
- the organization- Returns:
- the organization that was added
-
addOrganization
public Organization addOrganization(String externalReferenceCode, long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) throws PortalException Adds an organization.This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures. It is not necessary to make a subsequent call to
addOrganizationResources(long, Organization)
.- Specified by:
addOrganization
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the creator/owner of the organizationparentOrganizationId
- the primary key of the organization's parent organizationname
- the organization's nametype
- the organization's typeregionId
- the primary key of the organization's regioncountryId
- the primary key of the organization's countrystatusListTypeId
- the organization's workflow statuscomments
- the comments about the organizationsite
- whether the organization is to be associated with a main siteserviceContext
- the service context to be applied (optionallynull
). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.- Returns:
- the organization
- Throws:
PortalException
-
addOrganizationResources
Adds a resource for each type of permission available on the organization.- Specified by:
addOrganizationResources
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the creator/owner of the organizationorganization
- the organization- Throws:
PortalException
-
addOrganizationUserByEmailAddress
public User addOrganizationUserByEmailAddress(String emailAddress, long organizationId, ServiceContext serviceContext) throws PortalException - Specified by:
addOrganizationUserByEmailAddress
in interfaceOrganizationLocalService
- Throws:
PortalException
-
addOrUpdateOrganization
public Organization addOrUpdateOrganization(String externalReferenceCode, long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, ServiceContext serviceContext) throws PortalException - Specified by:
addOrUpdateOrganization
in interfaceOrganizationLocalService
- Throws:
PortalException
-
addPasswordPolicyOrganizations
public void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) Assigns the password policy to the organizations, removing any other currently assigned password policies.- Specified by:
addPasswordPolicyOrganizations
in interfaceOrganizationLocalService
- Parameters:
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
-
addUserOrganization
public boolean addUserOrganization(long userId, long organizationId) - Specified by:
addUserOrganization
in interfaceOrganizationLocalService
-
addUserOrganization
- Specified by:
addUserOrganization
in interfaceOrganizationLocalService
-
addUserOrganizationByEmailAddress
public void addUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException - Specified by:
addUserOrganizationByEmailAddress
in interfaceOrganizationLocalService
- Throws:
PortalException
-
addUserOrganizations
- Specified by:
addUserOrganizations
in interfaceOrganizationLocalService
-
addUserOrganizations
public boolean addUserOrganizations(long userId, long[] organizationIds) - Specified by:
addUserOrganizations
in interfaceOrganizationLocalService
-
clearGroupOrganizations
public void clearGroupOrganizations(long groupId) - Specified by:
clearGroupOrganizations
in interfaceOrganizationLocalService
-
clearUserOrganizations
public void clearUserOrganizations(long userId) - Specified by:
clearUserOrganizations
in interfaceOrganizationLocalService
-
createOrganization
Creates a new organization with the primary key. Does not add the organization to the database.- Specified by:
createOrganization
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the primary key for the new organization- Returns:
- the new organization
-
createPersistedModel
- Specified by:
createPersistedModel
in interfaceOrganizationLocalService
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
PortalException
-
deleteGroupOrganization
public void deleteGroupOrganization(long groupId, long organizationId) - Specified by:
deleteGroupOrganization
in interfaceOrganizationLocalService
-
deleteGroupOrganization
- Specified by:
deleteGroupOrganization
in interfaceOrganizationLocalService
-
deleteGroupOrganizations
- Specified by:
deleteGroupOrganizations
in interfaceOrganizationLocalService
-
deleteGroupOrganizations
public void deleteGroupOrganizations(long groupId, long[] organizationIds) - Specified by:
deleteGroupOrganizations
in interfaceOrganizationLocalService
-
deleteLogo
Deletes the organization's logo.- Specified by:
deleteLogo
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the primary key of the organization- Throws:
PortalException
-
deleteOrganization
Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect OrganizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteOrganization
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the primary key of the organization- Returns:
- the organization that was removed
- Throws:
PortalException
- if a organization with the primary key could not be foundPortalException
-
deleteOrganization
Deletes the organization from the database. Also notifies the appropriate model listeners.Important: Inspect OrganizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
deleteOrganization
in interfaceOrganizationLocalService
- Parameters:
organization
- the organization- Returns:
- the organization that was removed
- Throws:
PortalException
PortalException
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfaceOrganizationLocalService
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
PortalException
-
deleteUserOrganization
public void deleteUserOrganization(long userId, long organizationId) - Specified by:
deleteUserOrganization
in interfaceOrganizationLocalService
-
deleteUserOrganization
- Specified by:
deleteUserOrganization
in interfaceOrganizationLocalService
-
deleteUserOrganizationByEmailAddress
public void deleteUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException - Specified by:
deleteUserOrganizationByEmailAddress
in interfaceOrganizationLocalService
- Throws:
PortalException
-
deleteUserOrganizations
- Specified by:
deleteUserOrganizations
in interfaceOrganizationLocalService
-
deleteUserOrganizations
public void deleteUserOrganizations(long userId, long[] organizationIds) - Specified by:
deleteUserOrganizations
in interfaceOrganizationLocalService
-
dslQuery
public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfaceOrganizationLocalService
- Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfaceOrganizationLocalService
- Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
- Specified by:
dynamicQuery
in interfaceOrganizationLocalService
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- Specified by:
dynamicQuery
in interfaceOrganizationLocalService
- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
Performs a dynamic query on the database and returns a range of the matching rows.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.OrganizationModelImpl
.- Specified by:
dynamicQuery
in interfaceOrganizationLocalService
- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator) Performs a dynamic query on the database and returns an ordered range of the matching rows.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.OrganizationModelImpl
.- Specified by:
dynamicQuery
in interfaceOrganizationLocalService
- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCount
in interfaceOrganizationLocalService
- Parameters:
dynamicQuery
- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
Returns the number of rows matching the dynamic query.- Specified by:
dynamicQueryCount
in interfaceOrganizationLocalService
- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchOrganization
- Specified by:
fetchOrganization
in interfaceOrganizationLocalService
-
fetchOrganization
Returns the organization with the name.- Specified by:
fetchOrganization
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyname
- the organization's name- Returns:
- the organization with the name, or
null
if no organization could be found
-
fetchOrganizationByExternalReferenceCode
public Organization fetchOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) - Specified by:
fetchOrganizationByExternalReferenceCode
in interfaceOrganizationLocalService
-
fetchOrganizationByUuidAndCompanyId
Returns the organization with the matching UUID and company.- Specified by:
fetchOrganizationByUuidAndCompanyId
in interfaceOrganizationLocalService
- Parameters:
uuid
- the organization's UUIDcompanyId
- the primary key of the company- Returns:
- the matching organization, or
null
if a matching organization could not be found
-
getActionableDynamicQuery
- Specified by:
getActionableDynamicQuery
in interfaceOrganizationLocalService
-
getChildrenTypes
- Specified by:
getChildrenTypes
in interfaceOrganizationLocalService
-
getExportActionableDynamicQuery
public ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) - Specified by:
getExportActionableDynamicQuery
in interfaceOrganizationLocalService
-
getGroupOrganizations
- Specified by:
getGroupOrganizations
in interfaceOrganizationLocalService
-
getGroupOrganizations
- Specified by:
getGroupOrganizations
in interfaceOrganizationLocalService
-
getGroupOrganizations
public List<Organization> getGroupOrganizations(long groupId, int start, int end, OrderByComparator<Organization> orderByComparator) - Specified by:
getGroupOrganizations
in interfaceOrganizationLocalService
-
getGroupOrganizationsCount
public int getGroupOrganizationsCount(long groupId) - Specified by:
getGroupOrganizationsCount
in interfaceOrganizationLocalService
-
getGroupPrimaryKeys
public long[] getGroupPrimaryKeys(long organizationId) Returns the groupIds of the groups associated with the organization.- Specified by:
getGroupPrimaryKeys
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the organizationId of the organization- Returns:
- long[] the groupIds of groups associated with the organization
-
getGroupUserOrganizations
public List<Organization> getGroupUserOrganizations(long groupId, long userId) throws PortalException - Specified by:
getGroupUserOrganizations
in interfaceOrganizationLocalService
- Throws:
PortalException
-
getIndexableActionableDynamicQuery
- Specified by:
getIndexableActionableDynamicQuery
in interfaceOrganizationLocalService
-
getNoAssetOrganizations
- Specified by:
getNoAssetOrganizations
in interfaceOrganizationLocalService
-
getOrganization
Returns the organization with the primary key.- Specified by:
getOrganization
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the primary key of the organization- Returns:
- the organization
- Throws:
PortalException
- if a organization with the primary key could not be foundPortalException
-
getOrganization
Returns the organization with the name.- Specified by:
getOrganization
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyname
- the organization's name- Returns:
- the organization with the name
- Throws:
PortalException
-
getOrganizationByExternalReferenceCode
public Organization getOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException - Specified by:
getOrganizationByExternalReferenceCode
in interfaceOrganizationLocalService
- Throws:
PortalException
-
getOrganizationByUuidAndCompanyId
public Organization getOrganizationByUuidAndCompanyId(String uuid, long companyId) throws PortalException Returns the organization with the matching UUID and company.- Specified by:
getOrganizationByUuidAndCompanyId
in interfaceOrganizationLocalService
- Parameters:
uuid
- the organization's UUIDcompanyId
- the primary key of the company- Returns:
- the matching organization
- Throws:
PortalException
- if a matching organization could not be foundPortalException
-
getOrganizationId
Returns the primary key of the organization with the name.- Specified by:
getOrganizationId
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyname
- the organization's name- Returns:
- the primary key of the organization with the name, or
0
if the organization could not be found
-
getOrganizations
Returns a range of all the organizations.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.OrganizationModelImpl
.- Specified by:
getOrganizations
in interfaceOrganizationLocalService
- Parameters:
start
- the lower bound of the range of organizationsend
- the upper bound of the range of organizations (not inclusive)- Returns:
- the range of organizations
-
getOrganizations
public List<Organization> getOrganizations(long userId, int start, int end, OrderByComparator<Organization> orderByComparator) throws PortalException - Specified by:
getOrganizations
in interfaceOrganizationLocalService
- Throws:
PortalException
-
getOrganizations
Returns all the organizations belonging to the parent organization.- Specified by:
getOrganizations
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organization- Returns:
- the organizations belonging to the parent organization
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end) Returns a range of all the organizations belonging to the parent organization.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
getOrganizations
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationstart
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)- Returns:
- the range of organizations belonging to the parent organization
- See Also:
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end) - Specified by:
getOrganizations
in interfaceOrganizationLocalService
-
getOrganizations
- Specified by:
getOrganizations
in interfaceOrganizationLocalService
-
getOrganizations
public List<Organization> getOrganizations(long companyId, String name, int start, int end, OrderByComparator<Organization> orderByComparator) - Specified by:
getOrganizations
in interfaceOrganizationLocalService
-
getOrganizations
Returns the organizations with the primary keys.- Specified by:
getOrganizations
in interfaceOrganizationLocalService
- Parameters:
organizationIds
- the primary keys of the organizations- Returns:
- the organizations with the primary keys
- Throws:
PortalException
-
getOrganizationsAndUsers
public List<Object> getOrganizationsAndUsers(long companyId, long parentOrganizationId, int status, int start, int end, OrderByComparator<?> orderByComparator) Returns all the organizations and users belonging to the parent organization.- Specified by:
getOrganizationsAndUsers
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization and user's companyparentOrganizationId
- the primary key of the organization and user's parent organizationstatus
- the user's workflow statusstart
- the lower bound of the range of organizations and users to returnend
- the upper bound of the range of organizations and users to return (not inclusive)orderByComparator
- the comparator to order the organizations and users (optionallynull
)- Returns:
- the organizations and users belonging to the parent organization
-
getOrganizationsAndUsersCount
public int getOrganizationsAndUsersCount(long companyId, long parentOrganizationId, int status) Returns the number of organizations and users belonging to the parent organization.- Specified by:
getOrganizationsAndUsersCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization and user's companyparentOrganizationId
- the primary key of the organization and user's parent organizationstatus
- the user's workflow status- Returns:
- the number of organizations and users belonging to the parent organization
-
getOrganizationsCount
public int getOrganizationsCount()Returns the number of organizations.- Specified by:
getOrganizationsCount
in interfaceOrganizationLocalService
- Returns:
- the number of organizations
-
getOrganizationsCount
public int getOrganizationsCount(long companyId, long parentOrganizationId) Returns the number of organizations belonging to the parent organization.- Specified by:
getOrganizationsCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organization- Returns:
- the number of organizations belonging to the parent organization
-
getOrganizationsCount
- Specified by:
getOrganizationsCount
in interfaceOrganizationLocalService
-
getOrganizationsCount
- Specified by:
getOrganizationsCount
in interfaceOrganizationLocalService
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifier
in interfaceOrganizationLocalService
- Returns:
- the OSGi service identifier
-
getParentOrganizations
Returns the parent organizations in order by closest ancestor. The list starts with the organization itself.- Specified by:
getParentOrganizations
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the primary key of the organization- Returns:
- the parent organizations in order by closest ancestor
- Throws:
PortalException
-
getPersistedModel
- Specified by:
getPersistedModel
in interfaceOrganizationLocalService
- Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
PortalException
-
getSuborganizations
Returns the suborganizations of the organizations.- Specified by:
getSuborganizations
in interfaceOrganizationLocalService
- Parameters:
organizations
- the organizations from which to get suborganizations- Returns:
- the suborganizations of the organizations
-
getSuborganizations
Returns the suborganizations of the organization.- Specified by:
getSuborganizations
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organization- Returns:
- the suborganizations of the organization
-
getSuborganizationsCount
public int getSuborganizationsCount(long companyId, long organizationId) Returns the count of suborganizations of the organization.- Specified by:
getSuborganizationsCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organization- Returns:
- the count of suborganizations of the organization
-
getSubsetOrganizations
public List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations) Returns the intersection ofallOrganizations
andavailableOrganizations
.- Specified by:
getSubsetOrganizations
in interfaceOrganizationLocalService
- Parameters:
allOrganizations
- the organizations to check for availabilityavailableOrganizations
- the available organizations- Returns:
- the intersection of
allOrganizations
andavailableOrganizations
-
getTypes
- Specified by:
getTypes
in interfaceOrganizationLocalService
-
getUserOrganizationIds
public long[] getUserOrganizationIds(long userId, boolean includeAdministrative) throws PortalException Returns all the IDs of organizations with which the user is explicitly associated, optionally including the IDs of organizations that the user administers or owns.A user is considered to be explicitly associated with an organization if his account is individually created within the organization or if the user is later added to it.
- Specified by:
getUserOrganizationIds
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the userincludeAdministrative
- whether to include the IDs of organizations that the user administers or owns, even if he's not a member of the organizations- Returns:
- the IDs of organizations with which the user is explicitly associated, optionally including the IDs of organizations that the user administers or owns
- Throws:
PortalException
-
getUserOrganizations
- Specified by:
getUserOrganizations
in interfaceOrganizationLocalService
-
getUserOrganizations
public List<Organization> getUserOrganizations(long userId, boolean includeAdministrative) throws PortalException Returns all the organizations with which the user is explicitly associated, optionally including the organizations that the user administers or owns.A user is considered to be explicitly associated with an organization if his account is individually created within the organization or if the user is later added as a member.
- Specified by:
getUserOrganizations
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the userincludeAdministrative
- whether to include the IDs of organizations that the user administers or owns, even if he's not a member of the organizations- Returns:
- the organizations with which the user is explicitly associated, optionally including the organizations that the user administers or owns
- Throws:
PortalException
-
getUserOrganizations
- Specified by:
getUserOrganizations
in interfaceOrganizationLocalService
-
getUserOrganizations
public List<Organization> getUserOrganizations(long userId, int start, int end, OrderByComparator<Organization> orderByComparator) - Specified by:
getUserOrganizations
in interfaceOrganizationLocalService
-
getUserOrganizationsCount
public int getUserOrganizationsCount(long userId) - Specified by:
getUserOrganizationsCount
in interfaceOrganizationLocalService
-
getUserPrimaryKeys
public long[] getUserPrimaryKeys(long organizationId) Returns the userIds of the users associated with the organization.- Specified by:
getUserPrimaryKeys
in interfaceOrganizationLocalService
- Parameters:
organizationId
- the organizationId of the organization- Returns:
- long[] the userIds of users associated with the organization
-
hasGroupOrganization
public boolean hasGroupOrganization(long groupId, long organizationId) - Specified by:
hasGroupOrganization
in interfaceOrganizationLocalService
-
hasGroupOrganizations
public boolean hasGroupOrganizations(long groupId) - Specified by:
hasGroupOrganizations
in interfaceOrganizationLocalService
-
hasPasswordPolicyOrganization
public boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId) Returnstrue
if the password policy has been assigned to the organization.- Specified by:
hasPasswordPolicyOrganization
in interfaceOrganizationLocalService
- Parameters:
passwordPolicyId
- the primary key of the password policyorganizationId
- the primary key of the organization- Returns:
true
if the password policy has been assigned to the organization;false
otherwise
-
hasUserOrganization
public boolean hasUserOrganization(long userId, long organizationId) - Specified by:
hasUserOrganization
in interfaceOrganizationLocalService
-
hasUserOrganization
public boolean hasUserOrganization(long userId, long organizationId, boolean inheritSuborganizations, boolean includeSpecifiedOrganization) throws PortalException Returnstrue
if the user is a member of the organization, optionally focusing on suborganizations or the specified organization. This method is usually called to determine if the user has view access to a resource belonging to the organization.-
If
inheritSuborganizations=
: the method checks whether the user belongs to the organization specified byfalse
organizationId
. The parameterincludeSpecifiedOrganization
is ignored. -
The parameter
includeSpecifiedOrganization
is ignored unlessinheritSuborganizations
is alsotrue
. -
If
inheritSuborganizations=
andtrue
includeSpecifiedOrganization=
: the method checks whether the user belongs to one of the child organizations of the one specified byfalse
organizationId
. -
If
inheritSuborganizations=
andtrue
includeSpecifiedOrganization=
: the method checks whether the user belongs to the organization specified bytrue
organizationId
or any of its child organizations.
- Specified by:
hasUserOrganization
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the organization's userorganizationId
- the primary key of the organizationinheritSuborganizations
- iftrue
suborganizations are considered in the determinationincludeSpecifiedOrganization
- iftrue
the organization specified byorganizationId
is considered in the determination- Returns:
true
if the user has access to the organization;false
otherwise- Throws:
PortalException
- See Also:
-
If
-
hasUserOrganizations
public boolean hasUserOrganizations(long userId) - Specified by:
hasUserOrganizations
in interfaceOrganizationLocalService
-
isCountryEnabled
- Specified by:
isCountryEnabled
in interfaceOrganizationLocalService
-
isCountryRequired
- Specified by:
isCountryRequired
in interfaceOrganizationLocalService
-
isRootable
- Specified by:
isRootable
in interfaceOrganizationLocalService
-
rebuildTree
Rebuilds the organization's tree.Only call this method if the tree has become stale through operations other than normal CRUD. Under normal circumstances the tree is automatically rebuilt whenever necessary.
- Specified by:
rebuildTree
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's company- Throws:
PortalException
-
search
public Hits search(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String, Object> params, int start, int end, Sort sort) Returns an ordered range of all the organizations that match the keywords, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, street, city, zipcode, type, region or country (optionallynull
)params
- the finder parameters (optionallynull
).start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)sort
- the field and direction by which to sort (optionallynull
)- Returns:
- the matching organizations ordered by name
-
search
public List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params, int start, int end) Returns a name ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. It is preferable to use the indexed versionsearch(long, long, String, LinkedHashMap, int, int, Sort)
instead of this method wherever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionallynull
)type
- the organization's type (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder params. For more information seeOrganizationFinder
start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)- Returns:
- the matching organizations ordered by name
- See Also:
-
search
public List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Organization> orderByComparator) Returns an ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. It is preferable to use the indexed versionsearch(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort)
instead of this method wherever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionallynull
)type
- the organization's type (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder params. For more information seeOrganizationFinder
start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)orderByComparator
- the comparator to order the organizations (optionallynull
)- Returns:
- the matching organizations ordered by comparator
orderByComparator
- See Also:
-
search
public List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator, int start, int end) Returns a name ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. It is preferable to use the indexed versionsearch(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort)
instead of this method wherever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parentname
- the name keywords (space separated, optionallynull
)type
- the organization's type (optionallynull
)street
- the street keywords (optionallynull
)city
- the city keywords (optionallynull
)zip
- the zipcode keywords (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder parameters (optionallynull
). For more information seeOrganizationFinder
andOperator
- whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)- Returns:
- the matching organizations ordered by name
- See Also:
-
search
public List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator, int start, int end, OrderByComparator<Organization> orderByComparator) Returns an ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. It is preferable to use the indexed versionsearch(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort)
instead of this method wherever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationname
- the name keywords (space separated, optionallynull
)type
- the organization's type (optionallynull
)street
- the street keywords (optionallynull
)city
- the city keywords (optionallynull
)zip
- the zipcode keywords (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder parameters (optionallynull
). For more information seeOrganizationFinder
andOperator
- whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)orderByComparator
- the comparator to order the organizations (optionallynull
)- Returns:
- the matching organizations ordered by comparator
orderByComparator
- See Also:
-
search
public Hits search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String, Object> params, boolean andSearch, int start, int end, Sort sort) Returns an ordered range of all the organizations whose name, type, or location fields match the keywords specified for them, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
toQueryUtil#ALL_POS
will return the full result set.- Specified by:
search
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationname
- the name keywords (space separated, optionallynull
)type
- the type keywords (optionallynull
)street
- the street keywords (optionallynull
)city
- the city keywords (optionallynull
)zip
- the zipcode keywords (optionallynull
)region
- the region keywords (optionallynull
)country
- the country keywords (optionallynull
)params
- the finder parameters (optionallynull
).andSearch
- whether every field must match its keywords or just one fieldstart
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not inclusive)sort
- the field and direction by which to sort (optionallynull
)- Returns:
- the matching organizations ordered by
sort
-
searchCount
public int searchCount(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String, Object> params) Returns the number of organizations that match the keywords, type, region, and country.- Specified by:
searchCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionallynull
)type
- the organization's type (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder parameters (optionallynull
). For more information seeOrganizationFinder
- Returns:
- the number of matching organizations
- See Also:
-
searchCount
public int searchCount(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String, Object> params, boolean andOperator) Returns the number of organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them.- Specified by:
searchCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent organizationname
- the name keywords (space separated, optionallynull
)type
- the organization's type (optionallynull
)street
- the street keywords (optionallynull
)city
- the city keywords (optionallynull
)zip
- the zipcode keywords (optionallynull
)regionId
- the primary key of the organization's region (optionallynull
)countryId
- the primary key of the organization's country (optionallynull
)params
- the finder parameters (optionallynull
). For more information seeOrganizationFinder
andOperator
- whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".- Returns:
- the number of matching organizations
- See Also:
-
searchOrganizations
public BaseModelSearchResult<Organization> searchOrganizations(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String, Object> params, int start, int end, Sort sort) throws PortalException- Specified by:
searchOrganizations
in interfaceOrganizationLocalService
- Throws:
PortalException
-
searchOrganizations
public BaseModelSearchResult<Organization> searchOrganizations(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String, Object> params, boolean andSearch, int start, int end, Sort sort) throws PortalException- Specified by:
searchOrganizations
in interfaceOrganizationLocalService
- Throws:
PortalException
-
searchOrganizationsAndUsers
public Hits searchOrganizationsAndUsers(long companyId, long parentOrganizationId, String keywords, int status, LinkedHashMap<String, Object> params, int start, int end, Sort[] sorts) throws PortalExceptionReturns the organizations and users that match the keywords specified for them and belong to the parent organization.- Specified by:
searchOrganizationsAndUsers
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization and user's companyparentOrganizationId
- the primary key of the organization and user's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, type, or location fields or user's first name, middle name, last name, screen name, email address, or address fieldsstatus
- user's workflow statusparams
- the finder parameters (optionallynull
).start
- the lower bound of the range of organizations and users to returnend
- the upper bound of the range of organizations and users to return (not inclusive)- Returns:
- the matching organizations and users
- Throws:
PortalException
-
searchOrganizationsAndUsersCount
public int searchOrganizationsAndUsersCount(long companyId, long parentOrganizationId, String keywords, int status, LinkedHashMap<String, Object> params) throws PortalExceptionReturns the number of organizations and users that match the keywords specified for them and belong to the parent organization.- Specified by:
searchOrganizationsAndUsersCount
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization and user's companyparentOrganizationId
- the primary key of the organization and user's parent organizationkeywords
- the keywords (space separated), which may occur in the organization's name, type, or location fields or user's first name, middle name, last name, screen name, email address, or address fieldsstatus
- user's workflow statusparams
- the finder parameters (optionallynull
).- Returns:
- the number of matching organizations and users
- Throws:
PortalException
-
setGroupOrganizations
public void setGroupOrganizations(long groupId, long[] organizationIds) - Specified by:
setGroupOrganizations
in interfaceOrganizationLocalService
-
setUserOrganizations
public void setUserOrganizations(long userId, long[] organizationIds) - Specified by:
setUserOrganizations
in interfaceOrganizationLocalService
-
unsetGroupOrganizations
public void unsetGroupOrganizations(long groupId, long[] organizationIds) Removes the organizations from the group.- Specified by:
unsetGroupOrganizations
in interfaceOrganizationLocalService
- Parameters:
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizations
-
unsetPasswordPolicyOrganizations
public void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) Removes the organizations from the password policy.- Specified by:
unsetPasswordPolicyOrganizations
in interfaceOrganizationLocalService
- Parameters:
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
-
updateAsset
public void updateAsset(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames) throws PortalException Updates the organization's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.- Specified by:
updateAsset
in interfaceOrganizationLocalService
- Parameters:
userId
- the primary key of the userorganization
- the organizationassetCategoryIds
- the primary keys of the asset categoriesassetTagNames
- the asset tag names- Throws:
PortalException
-
updateLogo
- Specified by:
updateLogo
in interfaceOrganizationLocalService
- Throws:
PortalException
-
updateOrganization
Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect OrganizationLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Specified by:
updateOrganization
in interfaceOrganizationLocalService
- Parameters:
organization
- the organization- Returns:
- the organization that was updated
-
updateOrganization
public Organization updateOrganization(String externalReferenceCode, long companyId, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, ServiceContext serviceContext) throws PortalException Updates the organization.- Specified by:
updateOrganization
in interfaceOrganizationLocalService
- Parameters:
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organizationparentOrganizationId
- the primary key of organization's parent organizationname
- the organization's nametype
- the organization's typeregionId
- the primary key of the organization's regioncountryId
- the primary key of the organization's countrystatusListTypeId
- the organization's workflow statuscomments
- the comments about the organizationhasLogo
- if the organization has a custom logologoBytes
- the new logo image datasite
- whether the organization is to be associated with a main siteserviceContext
- the service context to be applied (optionallynull
). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.- Returns:
- the organization
- Throws:
PortalException
-
getBasePersistence
- Specified by:
getBasePersistence
in interfacePersistedModelLocalService
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<Organization>
- Specified by:
getCTPersistence
in interfaceOrganizationLocalService
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<Organization>
- Specified by:
getModelClass
in interfaceOrganizationLocalService
-
updateWithUnsafeFunction
public <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Organization>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<Organization>
- Specified by:
updateWithUnsafeFunction
in interfaceOrganizationLocalService
- Throws:
E extends Throwable
-
getWrappedService
- Specified by:
getWrappedService
in interfaceServiceWrapper<OrganizationLocalService>
-
setWrappedService
- Specified by:
setWrappedService
in interfaceServiceWrapper<OrganizationLocalService>
-