/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.portal.service.base;
import aQute.bnd.annotation.ProviderType;
import com.liferay.expando.kernel.service.persistence.ExpandoRowPersistence;
import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil;
import com.liferay.exportimport.kernel.lar.ManifestSummary;
import com.liferay.exportimport.kernel.lar.PortletDataContext;
import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil;
import com.liferay.exportimport.kernel.lar.StagedModelType;
import com.liferay.exportimport.kernel.service.persistence.ExportImportConfigurationFinder;
import com.liferay.exportimport.kernel.service.persistence.ExportImportConfigurationPersistence;
import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.dao.db.DB;
import com.liferay.portal.kernel.dao.db.DBManagerUtil;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.Projection;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.model.PersistedModel;
import com.liferay.portal.kernel.model.UserGroup;
import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService;
import com.liferay.portal.kernel.search.Indexable;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.service.BaseLocalServiceImpl;
import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry;
import com.liferay.portal.kernel.service.UserGroupLocalService;
import com.liferay.portal.kernel.service.persistence.GroupFinder;
import com.liferay.portal.kernel.service.persistence.GroupPersistence;
import com.liferay.portal.kernel.service.persistence.LayoutFinder;
import com.liferay.portal.kernel.service.persistence.LayoutPersistence;
import com.liferay.portal.kernel.service.persistence.TeamFinder;
import com.liferay.portal.kernel.service.persistence.TeamPersistence;
import com.liferay.portal.kernel.service.persistence.UserFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupGroupRoleFinder;
import com.liferay.portal.kernel.service.persistence.UserGroupGroupRolePersistence;
import com.liferay.portal.kernel.service.persistence.UserGroupPersistence;
import com.liferay.portal.kernel.service.persistence.UserPersistence;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.PortalUtil;
import java.io.Serializable;
import java.util.List;
import javax.sql.DataSource;
/**
* Provides the base implementation for the user group local service.
*
* <p>
* 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.UserGroupLocalServiceImpl}.
* </p>
*
* @author Brian Wing Shun Chan
* @see com.liferay.portal.service.impl.UserGroupLocalServiceImpl
* @see com.liferay.portal.kernel.service.UserGroupLocalServiceUtil
* @generated
*/
@ProviderType
public abstract class UserGroupLocalServiceBaseImpl extends BaseLocalServiceImpl
implements UserGroupLocalService, IdentifiableOSGiService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this class directly. Always use {@link com.liferay.portal.kernel.service.UserGroupLocalServiceUtil} to access the user group local service.
*/
/**
* Adds the user group to the database. Also notifies the appropriate model listeners.
*
* @param userGroup the user group
* @return the user group that was added
*/
@Indexable(type = IndexableType.REINDEX)
@Override
public UserGroup addUserGroup(UserGroup userGroup) {
userGroup.setNew(true);
return userGroupPersistence.update(userGroup);
}
/**
* Creates a new user group with the primary key. Does not add the user group to the database.
*
* @param userGroupId the primary key for the new user group
* @return the new user group
*/
@Override
public UserGroup createUserGroup(long userGroupId) {
return userGroupPersistence.create(userGroupId);
}
/**
* Deletes the user group with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param userGroupId the primary key of the user group
* @return the user group that was removed
* @throws PortalException if a user group with the primary key could not be found
*/
@Indexable(type = IndexableType.DELETE)
@Override
public UserGroup deleteUserGroup(long userGroupId)
throws PortalException {
return userGroupPersistence.remove(userGroupId);
}
/**
* Deletes the user group from the database. Also notifies the appropriate model listeners.
*
* @param userGroup the user group
* @return the user group that was removed
* @throws PortalException
*/
@Indexable(type = IndexableType.DELETE)
@Override
public UserGroup deleteUserGroup(UserGroup userGroup)
throws PortalException {
return userGroupPersistence.remove(userGroup);
}
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(UserGroup.class,
clazz.getClassLoader());
}
/**
* Performs a dynamic query on the database and returns the matching rows.
*
* @param dynamicQuery the dynamic query
* @return the matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {
return userGroupPersistence.findWithDynamicQuery(dynamicQuery);
}
/**
* Performs a dynamic query on the database and returns a range of the matching rows.
*
* <p>
* 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.UserGroupModelImpl}. 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.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @return the range of matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
int end) {
return userGroupPersistence.findWithDynamicQuery(dynamicQuery, start,
end);
}
/**
* Performs a dynamic query on the database and returns an ordered range of the matching rows.
*
* <p>
* 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.UserGroupModelImpl}. 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.
* </p>
*
* @param dynamicQuery the dynamic query
* @param start the lower bound of the range of model instances
* @param end the upper bound of the range of model instances (not inclusive)
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching rows
*/
@Override
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
int end, OrderByComparator<T> orderByComparator) {
return userGroupPersistence.findWithDynamicQuery(dynamicQuery, start,
end, orderByComparator);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery) {
return userGroupPersistence.countWithDynamicQuery(dynamicQuery);
}
/**
* Returns the number of rows matching the dynamic query.
*
* @param dynamicQuery the dynamic query
* @param projection the projection to apply to the query
* @return the number of rows matching the dynamic query
*/
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection) {
return userGroupPersistence.countWithDynamicQuery(dynamicQuery,
projection);
}
@Override
public UserGroup fetchUserGroup(long userGroupId) {
return userGroupPersistence.fetchByPrimaryKey(userGroupId);
}
/**
* Returns the user group with the matching UUID and company.
*
* @param uuid the user group's UUID
* @param companyId the primary key of the company
* @return the matching user group, or <code>null</code> if a matching user group could not be found
*/
@Override
public UserGroup fetchUserGroupByUuidAndCompanyId(String uuid,
long companyId) {
return userGroupPersistence.fetchByUuid_C_First(uuid, companyId, null);
}
/**
* Returns the user group with the primary key.
*
* @param userGroupId the primary key of the user group
* @return the user group
* @throws PortalException if a user group with the primary key could not be found
*/
@Override
public UserGroup getUserGroup(long userGroupId) throws PortalException {
return userGroupPersistence.findByPrimaryKey(userGroupId);
}
@Override
public ActionableDynamicQuery getActionableDynamicQuery() {
ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();
actionableDynamicQuery.setBaseLocalService(userGroupLocalService);
actionableDynamicQuery.setClassLoader(getClassLoader());
actionableDynamicQuery.setModelClass(UserGroup.class);
actionableDynamicQuery.setPrimaryKeyPropertyName("userGroupId");
return actionableDynamicQuery;
}
@Override
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery();
indexableActionableDynamicQuery.setBaseLocalService(userGroupLocalService);
indexableActionableDynamicQuery.setClassLoader(getClassLoader());
indexableActionableDynamicQuery.setModelClass(UserGroup.class);
indexableActionableDynamicQuery.setPrimaryKeyPropertyName("userGroupId");
return indexableActionableDynamicQuery;
}
protected void initActionableDynamicQuery(
ActionableDynamicQuery actionableDynamicQuery) {
actionableDynamicQuery.setBaseLocalService(userGroupLocalService);
actionableDynamicQuery.setClassLoader(getClassLoader());
actionableDynamicQuery.setModelClass(UserGroup.class);
actionableDynamicQuery.setPrimaryKeyPropertyName("userGroupId");
}
@Override
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
final PortletDataContext portletDataContext) {
final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() {
@Override
public long performCount() throws PortalException {
ManifestSummary manifestSummary = portletDataContext.getManifestSummary();
StagedModelType stagedModelType = getStagedModelType();
long modelAdditionCount = super.performCount();
manifestSummary.addModelAdditionCount(stagedModelType,
modelAdditionCount);
long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext,
stagedModelType);
manifestSummary.addModelDeletionCount(stagedModelType,
modelDeletionCount);
return modelAdditionCount;
}
};
initActionableDynamicQuery(exportActionableDynamicQuery);
exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() {
@Override
public void addCriteria(DynamicQuery dynamicQuery) {
portletDataContext.addDateRangeCriteria(dynamicQuery,
"modifiedDate");
}
});
exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId());
exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod<UserGroup>() {
@Override
public void performAction(UserGroup userGroup)
throws PortalException {
StagedModelDataHandlerUtil.exportStagedModel(portletDataContext,
userGroup);
}
});
exportActionableDynamicQuery.setStagedModelType(new StagedModelType(
PortalUtil.getClassNameId(UserGroup.class.getName())));
return exportActionableDynamicQuery;
}
/**
* @throws PortalException
*/
@Override
public PersistedModel deletePersistedModel(PersistedModel persistedModel)
throws PortalException {
return userGroupLocalService.deleteUserGroup((UserGroup)persistedModel);
}
@Override
public PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException {
return userGroupPersistence.findByPrimaryKey(primaryKeyObj);
}
/**
* Returns the user group with the matching UUID and company.
*
* @param uuid the user group's UUID
* @param companyId the primary key of the company
* @return the matching user group
* @throws PortalException if a matching user group could not be found
*/
@Override
public UserGroup getUserGroupByUuidAndCompanyId(String uuid, long companyId)
throws PortalException {
return userGroupPersistence.findByUuid_C_First(uuid, companyId, null);
}
/**
* Returns a range of all the user groups.
*
* <p>
* 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.UserGroupModelImpl}. 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.
* </p>
*
* @param start the lower bound of the range of user groups
* @param end the upper bound of the range of user groups (not inclusive)
* @return the range of user groups
*/
@Override
public List<UserGroup> getUserGroups(int start, int end) {
return userGroupPersistence.findAll(start, end);
}
/**
* Returns the number of user groups.
*
* @return the number of user groups
*/
@Override
public int getUserGroupsCount() {
return userGroupPersistence.countAll();
}
/**
* Updates the user group in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param userGroup the user group
* @return the user group that was updated
*/
@Indexable(type = IndexableType.REINDEX)
@Override
public UserGroup updateUserGroup(UserGroup userGroup) {
return userGroupPersistence.update(userGroup);
}
/**
*/
@Override
public void addGroupUserGroup(long groupId, long userGroupId) {
groupPersistence.addUserGroup(groupId, userGroupId);
}
/**
*/
@Override
public void addGroupUserGroup(long groupId, UserGroup userGroup) {
groupPersistence.addUserGroup(groupId, userGroup);
}
/**
*/
@Override
public void addGroupUserGroups(long groupId, long[] userGroupIds) {
groupPersistence.addUserGroups(groupId, userGroupIds);
}
/**
*/
@Override
public void addGroupUserGroups(long groupId, List<UserGroup> userGroups) {
groupPersistence.addUserGroups(groupId, userGroups);
}
/**
*/
@Override
public void clearGroupUserGroups(long groupId) {
groupPersistence.clearUserGroups(groupId);
}
/**
*/
@Override
public void deleteGroupUserGroup(long groupId, long userGroupId) {
groupPersistence.removeUserGroup(groupId, userGroupId);
}
/**
*/
@Override
public void deleteGroupUserGroup(long groupId, UserGroup userGroup) {
groupPersistence.removeUserGroup(groupId, userGroup);
}
/**
*/
@Override
public void deleteGroupUserGroups(long groupId, long[] userGroupIds) {
groupPersistence.removeUserGroups(groupId, userGroupIds);
}
/**
*/
@Override
public void deleteGroupUserGroups(long groupId, List<UserGroup> userGroups) {
groupPersistence.removeUserGroups(groupId, userGroups);
}
/**
* Returns the groupIds of the groups associated with the user group.
*
* @param userGroupId the userGroupId of the user group
* @return long[] the groupIds of groups associated with the user group
*/
@Override
public long[] getGroupPrimaryKeys(long userGroupId) {
return userGroupPersistence.getGroupPrimaryKeys(userGroupId);
}
/**
*/
@Override
public List<UserGroup> getGroupUserGroups(long groupId) {
return groupPersistence.getUserGroups(groupId);
}
/**
*/
@Override
public List<UserGroup> getGroupUserGroups(long groupId, int start, int end) {
return groupPersistence.getUserGroups(groupId, start, end);
}
/**
*/
@Override
public List<UserGroup> getGroupUserGroups(long groupId, int start, int end,
OrderByComparator<UserGroup> orderByComparator) {
return groupPersistence.getUserGroups(groupId, start, end,
orderByComparator);
}
/**
*/
@Override
public int getGroupUserGroupsCount(long groupId) {
return groupPersistence.getUserGroupsSize(groupId);
}
/**
*/
@Override
public boolean hasGroupUserGroup(long groupId, long userGroupId) {
return groupPersistence.containsUserGroup(groupId, userGroupId);
}
/**
*/
@Override
public boolean hasGroupUserGroups(long groupId) {
return groupPersistence.containsUserGroups(groupId);
}
/**
*/
@Override
public void setGroupUserGroups(long groupId, long[] userGroupIds) {
groupPersistence.setUserGroups(groupId, userGroupIds);
}
/**
*/
@Override
public void addTeamUserGroup(long teamId, long userGroupId) {
teamPersistence.addUserGroup(teamId, userGroupId);
}
/**
*/
@Override
public void addTeamUserGroup(long teamId, UserGroup userGroup) {
teamPersistence.addUserGroup(teamId, userGroup);
}
/**
*/
@Override
public void addTeamUserGroups(long teamId, long[] userGroupIds) {
teamPersistence.addUserGroups(teamId, userGroupIds);
}
/**
*/
@Override
public void addTeamUserGroups(long teamId, List<UserGroup> userGroups) {
teamPersistence.addUserGroups(teamId, userGroups);
}
/**
*/
@Override
public void clearTeamUserGroups(long teamId) {
teamPersistence.clearUserGroups(teamId);
}
/**
*/
@Override
public void deleteTeamUserGroup(long teamId, long userGroupId) {
teamPersistence.removeUserGroup(teamId, userGroupId);
}
/**
*/
@Override
public void deleteTeamUserGroup(long teamId, UserGroup userGroup) {
teamPersistence.removeUserGroup(teamId, userGroup);
}
/**
*/
@Override
public void deleteTeamUserGroups(long teamId, long[] userGroupIds) {
teamPersistence.removeUserGroups(teamId, userGroupIds);
}
/**
*/
@Override
public void deleteTeamUserGroups(long teamId, List<UserGroup> userGroups) {
teamPersistence.removeUserGroups(teamId, userGroups);
}
/**
* Returns the teamIds of the teams associated with the user group.
*
* @param userGroupId the userGroupId of the user group
* @return long[] the teamIds of teams associated with the user group
*/
@Override
public long[] getTeamPrimaryKeys(long userGroupId) {
return userGroupPersistence.getTeamPrimaryKeys(userGroupId);
}
/**
*/
@Override
public List<UserGroup> getTeamUserGroups(long teamId) {
return teamPersistence.getUserGroups(teamId);
}
/**
*/
@Override
public List<UserGroup> getTeamUserGroups(long teamId, int start, int end) {
return teamPersistence.getUserGroups(teamId, start, end);
}
/**
*/
@Override
public List<UserGroup> getTeamUserGroups(long teamId, int start, int end,
OrderByComparator<UserGroup> orderByComparator) {
return teamPersistence.getUserGroups(teamId, start, end,
orderByComparator);
}
/**
*/
@Override
public int getTeamUserGroupsCount(long teamId) {
return teamPersistence.getUserGroupsSize(teamId);
}
/**
*/
@Override
public boolean hasTeamUserGroup(long teamId, long userGroupId) {
return teamPersistence.containsUserGroup(teamId, userGroupId);
}
/**
*/
@Override
public boolean hasTeamUserGroups(long teamId) {
return teamPersistence.containsUserGroups(teamId);
}
/**
*/
@Override
public void setTeamUserGroups(long teamId, long[] userGroupIds) {
teamPersistence.setUserGroups(teamId, userGroupIds);
}
/**
*/
@Override
public void addUserUserGroup(long userId, long userGroupId) {
userPersistence.addUserGroup(userId, userGroupId);
}
/**
*/
@Override
public void addUserUserGroup(long userId, UserGroup userGroup) {
userPersistence.addUserGroup(userId, userGroup);
}
/**
*/
@Override
public void addUserUserGroups(long userId, long[] userGroupIds) {
userPersistence.addUserGroups(userId, userGroupIds);
}
/**
*/
@Override
public void addUserUserGroups(long userId, List<UserGroup> userGroups) {
userPersistence.addUserGroups(userId, userGroups);
}
/**
*/
@Override
public void clearUserUserGroups(long userId) {
userPersistence.clearUserGroups(userId);
}
/**
*/
@Override
public void deleteUserUserGroup(long userId, long userGroupId) {
userPersistence.removeUserGroup(userId, userGroupId);
}
/**
*/
@Override
public void deleteUserUserGroup(long userId, UserGroup userGroup) {
userPersistence.removeUserGroup(userId, userGroup);
}
/**
*/
@Override
public void deleteUserUserGroups(long userId, long[] userGroupIds) {
userPersistence.removeUserGroups(userId, userGroupIds);
}
/**
*/
@Override
public void deleteUserUserGroups(long userId, List<UserGroup> userGroups) {
userPersistence.removeUserGroups(userId, userGroups);
}
/**
* Returns the userIds of the users associated with the user group.
*
* @param userGroupId the userGroupId of the user group
* @return long[] the userIds of users associated with the user group
*/
@Override
public long[] getUserPrimaryKeys(long userGroupId) {
return userGroupPersistence.getUserPrimaryKeys(userGroupId);
}
/**
*/
@Override
public List<UserGroup> getUserUserGroups(long userId) {
return userPersistence.getUserGroups(userId);
}
/**
*/
@Override
public List<UserGroup> getUserUserGroups(long userId, int start, int end) {
return userPersistence.getUserGroups(userId, start, end);
}
/**
*/
@Override
public List<UserGroup> getUserUserGroups(long userId, int start, int end,
OrderByComparator<UserGroup> orderByComparator) {
return userPersistence.getUserGroups(userId, start, end,
orderByComparator);
}
/**
*/
@Override
public int getUserUserGroupsCount(long userId) {
return userPersistence.getUserGroupsSize(userId);
}
/**
*/
@Override
public boolean hasUserUserGroup(long userId, long userGroupId) {
return userPersistence.containsUserGroup(userId, userGroupId);
}
/**
*/
@Override
public boolean hasUserUserGroups(long userId) {
return userPersistence.containsUserGroups(userId);
}
/**
* @throws PortalException
*/
@Override
public void setUserUserGroups(long userId, long[] userGroupIds)
throws PortalException {
userPersistence.setUserGroups(userId, userGroupIds);
}
/**
* Returns the user group local service.
*
* @return the user group local service
*/
public UserGroupLocalService getUserGroupLocalService() {
return userGroupLocalService;
}
/**
* Sets the user group local service.
*
* @param userGroupLocalService the user group local service
*/
public void setUserGroupLocalService(
UserGroupLocalService userGroupLocalService) {
this.userGroupLocalService = userGroupLocalService;
}
/**
* Returns the user group persistence.
*
* @return the user group persistence
*/
public UserGroupPersistence getUserGroupPersistence() {
return userGroupPersistence;
}
/**
* Sets the user group persistence.
*
* @param userGroupPersistence the user group persistence
*/
public void setUserGroupPersistence(
UserGroupPersistence userGroupPersistence) {
this.userGroupPersistence = userGroupPersistence;
}
/**
* Returns the user group finder.
*
* @return the user group finder
*/
public UserGroupFinder getUserGroupFinder() {
return userGroupFinder;
}
/**
* Sets the user group finder.
*
* @param userGroupFinder the user group finder
*/
public void setUserGroupFinder(UserGroupFinder userGroupFinder) {
this.userGroupFinder = userGroupFinder;
}
/**
* Returns the counter local service.
*
* @return the counter local service
*/
public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() {
return counterLocalService;
}
/**
* Sets the counter local service.
*
* @param counterLocalService the counter local service
*/
public void setCounterLocalService(
com.liferay.counter.kernel.service.CounterLocalService counterLocalService) {
this.counterLocalService = counterLocalService;
}
/**
* Returns the group local service.
*
* @return the group local service
*/
public com.liferay.portal.kernel.service.GroupLocalService getGroupLocalService() {
return groupLocalService;
}
/**
* Sets the group local service.
*
* @param groupLocalService the group local service
*/
public void setGroupLocalService(
com.liferay.portal.kernel.service.GroupLocalService groupLocalService) {
this.groupLocalService = groupLocalService;
}
/**
* Returns the group persistence.
*
* @return the group persistence
*/
public GroupPersistence getGroupPersistence() {
return groupPersistence;
}
/**
* Sets the group persistence.
*
* @param groupPersistence the group persistence
*/
public void setGroupPersistence(GroupPersistence groupPersistence) {
this.groupPersistence = groupPersistence;
}
/**
* Returns the group finder.
*
* @return the group finder
*/
public GroupFinder getGroupFinder() {
return groupFinder;
}
/**
* Sets the group finder.
*
* @param groupFinder the group finder
*/
public void setGroupFinder(GroupFinder groupFinder) {
this.groupFinder = groupFinder;
}
/**
* Returns the layout local service.
*
* @return the layout local service
*/
public com.liferay.portal.kernel.service.LayoutLocalService getLayoutLocalService() {
return layoutLocalService;
}
/**
* Sets the layout local service.
*
* @param layoutLocalService the layout local service
*/
public void setLayoutLocalService(
com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService) {
this.layoutLocalService = layoutLocalService;
}
/**
* Returns the layout persistence.
*
* @return the layout persistence
*/
public LayoutPersistence getLayoutPersistence() {
return layoutPersistence;
}
/**
* Sets the layout persistence.
*
* @param layoutPersistence the layout persistence
*/
public void setLayoutPersistence(LayoutPersistence layoutPersistence) {
this.layoutPersistence = layoutPersistence;
}
/**
* Returns the layout finder.
*
* @return the layout finder
*/
public LayoutFinder getLayoutFinder() {
return layoutFinder;
}
/**
* Sets the layout finder.
*
* @param layoutFinder the layout finder
*/
public void setLayoutFinder(LayoutFinder layoutFinder) {
this.layoutFinder = layoutFinder;
}
/**
* Returns the resource local service.
*
* @return the resource local service
*/
public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() {
return resourceLocalService;
}
/**
* Sets the resource local service.
*
* @param resourceLocalService the resource local service
*/
public void setResourceLocalService(
com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) {
this.resourceLocalService = resourceLocalService;
}
/**
* Returns the team local service.
*
* @return the team local service
*/
public com.liferay.portal.kernel.service.TeamLocalService getTeamLocalService() {
return teamLocalService;
}
/**
* Sets the team local service.
*
* @param teamLocalService the team local service
*/
public void setTeamLocalService(
com.liferay.portal.kernel.service.TeamLocalService teamLocalService) {
this.teamLocalService = teamLocalService;
}
/**
* Returns the team persistence.
*
* @return the team persistence
*/
public TeamPersistence getTeamPersistence() {
return teamPersistence;
}
/**
* Sets the team persistence.
*
* @param teamPersistence the team persistence
*/
public void setTeamPersistence(TeamPersistence teamPersistence) {
this.teamPersistence = teamPersistence;
}
/**
* Returns the team finder.
*
* @return the team finder
*/
public TeamFinder getTeamFinder() {
return teamFinder;
}
/**
* Sets the team finder.
*
* @param teamFinder the team finder
*/
public void setTeamFinder(TeamFinder teamFinder) {
this.teamFinder = teamFinder;
}
/**
* Returns the user local service.
*
* @return the user local service
*/
public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() {
return userLocalService;
}
/**
* Sets the user local service.
*
* @param userLocalService the user local service
*/
public void setUserLocalService(
com.liferay.portal.kernel.service.UserLocalService userLocalService) {
this.userLocalService = userLocalService;
}
/**
* Returns the user persistence.
*
* @return the user persistence
*/
public UserPersistence getUserPersistence() {
return userPersistence;
}
/**
* Sets the user persistence.
*
* @param userPersistence the user persistence
*/
public void setUserPersistence(UserPersistence userPersistence) {
this.userPersistence = userPersistence;
}
/**
* Returns the user finder.
*
* @return the user finder
*/
public UserFinder getUserFinder() {
return userFinder;
}
/**
* Sets the user finder.
*
* @param userFinder the user finder
*/
public void setUserFinder(UserFinder userFinder) {
this.userFinder = userFinder;
}
/**
* Returns the expando row local service.
*
* @return the expando row local service
*/
public com.liferay.expando.kernel.service.ExpandoRowLocalService getExpandoRowLocalService() {
return expandoRowLocalService;
}
/**
* Sets the expando row local service.
*
* @param expandoRowLocalService the expando row local service
*/
public void setExpandoRowLocalService(
com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService) {
this.expandoRowLocalService = expandoRowLocalService;
}
/**
* Returns the expando row persistence.
*
* @return the expando row persistence
*/
public ExpandoRowPersistence getExpandoRowPersistence() {
return expandoRowPersistence;
}
/**
* Sets the expando row persistence.
*
* @param expandoRowPersistence the expando row persistence
*/
public void setExpandoRowPersistence(
ExpandoRowPersistence expandoRowPersistence) {
this.expandoRowPersistence = expandoRowPersistence;
}
/**
* Returns the export import local service.
*
* @return the export import local service
*/
public com.liferay.exportimport.kernel.service.ExportImportLocalService getExportImportLocalService() {
return exportImportLocalService;
}
/**
* Sets the export import local service.
*
* @param exportImportLocalService the export import local service
*/
public void setExportImportLocalService(
com.liferay.exportimport.kernel.service.ExportImportLocalService exportImportLocalService) {
this.exportImportLocalService = exportImportLocalService;
}
/**
* Returns the export import configuration local service.
*
* @return the export import configuration local service
*/
public com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService getExportImportConfigurationLocalService() {
return exportImportConfigurationLocalService;
}
/**
* Sets the export import configuration local service.
*
* @param exportImportConfigurationLocalService the export import configuration local service
*/
public void setExportImportConfigurationLocalService(
com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
this.exportImportConfigurationLocalService = exportImportConfigurationLocalService;
}
/**
* Returns the export import configuration persistence.
*
* @return the export import configuration persistence
*/
public ExportImportConfigurationPersistence getExportImportConfigurationPersistence() {
return exportImportConfigurationPersistence;
}
/**
* Sets the export import configuration persistence.
*
* @param exportImportConfigurationPersistence the export import configuration persistence
*/
public void setExportImportConfigurationPersistence(
ExportImportConfigurationPersistence exportImportConfigurationPersistence) {
this.exportImportConfigurationPersistence = exportImportConfigurationPersistence;
}
/**
* Returns the export import configuration finder.
*
* @return the export import configuration finder
*/
public ExportImportConfigurationFinder getExportImportConfigurationFinder() {
return exportImportConfigurationFinder;
}
/**
* Sets the export import configuration finder.
*
* @param exportImportConfigurationFinder the export import configuration finder
*/
public void setExportImportConfigurationFinder(
ExportImportConfigurationFinder exportImportConfigurationFinder) {
this.exportImportConfigurationFinder = exportImportConfigurationFinder;
}
/**
* Returns the user group group role local service.
*
* @return the user group group role local service
*/
public com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService getUserGroupGroupRoleLocalService() {
return userGroupGroupRoleLocalService;
}
/**
* Sets the user group group role local service.
*
* @param userGroupGroupRoleLocalService the user group group role local service
*/
public void setUserGroupGroupRoleLocalService(
com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService) {
this.userGroupGroupRoleLocalService = userGroupGroupRoleLocalService;
}
/**
* Returns the user group group role persistence.
*
* @return the user group group role persistence
*/
public UserGroupGroupRolePersistence getUserGroupGroupRolePersistence() {
return userGroupGroupRolePersistence;
}
/**
* Sets the user group group role persistence.
*
* @param userGroupGroupRolePersistence the user group group role persistence
*/
public void setUserGroupGroupRolePersistence(
UserGroupGroupRolePersistence userGroupGroupRolePersistence) {
this.userGroupGroupRolePersistence = userGroupGroupRolePersistence;
}
/**
* Returns the user group group role finder.
*
* @return the user group group role finder
*/
public UserGroupGroupRoleFinder getUserGroupGroupRoleFinder() {
return userGroupGroupRoleFinder;
}
/**
* Sets the user group group role finder.
*
* @param userGroupGroupRoleFinder the user group group role finder
*/
public void setUserGroupGroupRoleFinder(
UserGroupGroupRoleFinder userGroupGroupRoleFinder) {
this.userGroupGroupRoleFinder = userGroupGroupRoleFinder;
}
public void afterPropertiesSet() {
persistedModelLocalServiceRegistry.register("com.liferay.portal.kernel.model.UserGroup",
userGroupLocalService);
}
public void destroy() {
persistedModelLocalServiceRegistry.unregister(
"com.liferay.portal.kernel.model.UserGroup");
}
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
@Override
public String getOSGiServiceIdentifier() {
return UserGroupLocalService.class.getName();
}
protected Class<?> getModelClass() {
return UserGroup.class;
}
protected String getModelClassName() {
return UserGroup.class.getName();
}
/**
* Performs a SQL query.
*
* @param sql the sql query
*/
protected void runSQL(String sql) {
try {
DataSource dataSource = userGroupPersistence.getDataSource();
DB db = DBManagerUtil.getDB();
sql = db.buildSQL(sql);
sql = PortalUtil.transformSQL(sql);
SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
sql);
sqlUpdate.update();
}
catch (Exception e) {
throw new SystemException(e);
}
}
@BeanReference(type = UserGroupLocalService.class)
protected UserGroupLocalService userGroupLocalService;
@BeanReference(type = UserGroupPersistence.class)
protected UserGroupPersistence userGroupPersistence;
@BeanReference(type = UserGroupFinder.class)
protected UserGroupFinder userGroupFinder;
@BeanReference(type = com.liferay.counter.kernel.service.CounterLocalService.class)
protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService;
@BeanReference(type = com.liferay.portal.kernel.service.GroupLocalService.class)
protected com.liferay.portal.kernel.service.GroupLocalService groupLocalService;
@BeanReference(type = GroupPersistence.class)
protected GroupPersistence groupPersistence;
@BeanReference(type = GroupFinder.class)
protected GroupFinder groupFinder;
@BeanReference(type = com.liferay.portal.kernel.service.LayoutLocalService.class)
protected com.liferay.portal.kernel.service.LayoutLocalService layoutLocalService;
@BeanReference(type = LayoutPersistence.class)
protected LayoutPersistence layoutPersistence;
@BeanReference(type = LayoutFinder.class)
protected LayoutFinder layoutFinder;
@BeanReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class)
protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService;
@BeanReference(type = com.liferay.portal.kernel.service.TeamLocalService.class)
protected com.liferay.portal.kernel.service.TeamLocalService teamLocalService;
@BeanReference(type = TeamPersistence.class)
protected TeamPersistence teamPersistence;
@BeanReference(type = TeamFinder.class)
protected TeamFinder teamFinder;
@BeanReference(type = com.liferay.portal.kernel.service.UserLocalService.class)
protected com.liferay.portal.kernel.service.UserLocalService userLocalService;
@BeanReference(type = UserPersistence.class)
protected UserPersistence userPersistence;
@BeanReference(type = UserFinder.class)
protected UserFinder userFinder;
@BeanReference(type = com.liferay.expando.kernel.service.ExpandoRowLocalService.class)
protected com.liferay.expando.kernel.service.ExpandoRowLocalService expandoRowLocalService;
@BeanReference(type = ExpandoRowPersistence.class)
protected ExpandoRowPersistence expandoRowPersistence;
@BeanReference(type = com.liferay.exportimport.kernel.service.ExportImportLocalService.class)
protected com.liferay.exportimport.kernel.service.ExportImportLocalService exportImportLocalService;
@BeanReference(type = com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService.class)
protected com.liferay.exportimport.kernel.service.ExportImportConfigurationLocalService exportImportConfigurationLocalService;
@BeanReference(type = ExportImportConfigurationPersistence.class)
protected ExportImportConfigurationPersistence exportImportConfigurationPersistence;
@BeanReference(type = ExportImportConfigurationFinder.class)
protected ExportImportConfigurationFinder exportImportConfigurationFinder;
@BeanReference(type = com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService.class)
protected com.liferay.portal.kernel.service.UserGroupGroupRoleLocalService userGroupGroupRoleLocalService;
@BeanReference(type = UserGroupGroupRolePersistence.class)
protected UserGroupGroupRolePersistence userGroupGroupRolePersistence;
@BeanReference(type = UserGroupGroupRoleFinder.class)
protected UserGroupGroupRoleFinder userGroupGroupRoleFinder;
@BeanReference(type = PersistedModelLocalServiceRegistry.class)
protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry;
}