Interface TeamLocalService
- All Superinterfaces:
BaseLocalService,CTService<Team>,PersistedModelLocalService
- All Known Implementing Classes:
TeamLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddTeam(long userId, long groupId, String name, String description, ServiceContext serviceContext) Adds the team to the database.booleanaddUserGroupTeam(long userGroupId, long teamId) booleanaddUserGroupTeam(long userGroupId, Team team) booleanaddUserGroupTeams(long userGroupId, long[] teamIds) booleanaddUserGroupTeams(long userGroupId, List<Team> teams) booleanaddUserTeam(long userId, long teamId) booleanaddUserTeam(long userId, Team team) booleanaddUserTeams(long userId, long[] teamIds) booleanaddUserTeams(long userId, List<Team> teams) voidclearUserGroupTeams(long userGroupId) voidclearUserTeams(long userId) createPersistedModel(Serializable primaryKeyObj) createTeam(long teamId) Creates a new team with the primary key.deletePersistedModel(PersistedModel persistedModel) deleteTeam(long teamId) Deletes the team with the primary key from the database.deleteTeam(Team team) Deletes the team from the database.voiddeleteTeams(long groupId) voiddeleteUserGroupTeam(long userGroupId, long teamId) voiddeleteUserGroupTeam(long userGroupId, Team team) voiddeleteUserGroupTeams(long userGroupId, long[] teamIds) voiddeleteUserGroupTeams(long userGroupId, List<Team> teams) voiddeleteUserTeam(long userId, long teamId) voiddeleteUserTeam(long userId, Team team) voiddeleteUserTeams(long userId, long[] teamIds) voiddeleteUserTeams(long userId, List<Team> teams) <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) intdslQueryCount(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.longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchTeam(long teamId) fetchTeamByUuidAndGroupId(String uuid, long groupId) Returns the team matching the UUID and group.getExportActionableDynamicQuery(PortletDataContext portletDataContext) getGroupTeams(long groupId) intgetGroupTeamsCount(long groupId) Returns the OSGi service identifier.getPersistedModel(Serializable primaryKeyObj) getTeam(long teamId) Returns the team with the primary key.getTeamByUuidAndGroupId(String uuid, long groupId) Returns the team matching the UUID and group.getTeams(int start, int end) Returns a range of all the teams.getTeamsByUuidAndCompanyId(String uuid, long companyId) Returns all the teams matching the UUID and company.getTeamsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<Team> orderByComparator) Returns a range of teams matching the UUID and company.intReturns the number of teams.long[]getUserGroupPrimaryKeys(long teamId) Returns the userGroupIds of the user groups associated with the team.getUserGroupTeams(long userGroupId) getUserGroupTeams(long userGroupId, int start, int end) getUserGroupTeams(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator) intgetUserGroupTeamsCount(long userGroupId) getUserOrUserGroupTeams(long groupId, long userId) long[]getUserPrimaryKeys(long teamId) Returns the userIds of the users associated with the team.getUserTeams(long userId) getUserTeams(long userId, int start, int end) getUserTeams(long userId, int start, int end, OrderByComparator<Team> orderByComparator) getUserTeams(long userId, long groupId) intgetUserTeamsCount(long userId) booleanhasUserGroupTeam(long userGroupId, long teamId) booleanhasUserGroupTeams(long userGroupId) booleanhasUserTeam(long userId, long teamId) booleanhasUserTeams(long userId) search(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) intsearchCount(long groupId, String name, String description, LinkedHashMap<String, Object> params) voidsetUserGroupTeams(long userGroupId, long[] teamIds) voidsetUserTeams(long userId, long[] teamIds) updateTeam(long teamId, String name, String description) updateTeam(Team team) Updates the team in the database or adds it if it does not yet exist.<R,E extends Throwable>
RupdateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Team>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addTeam
Team addTeam(long userId, long groupId, String name, String description, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addTeam
Adds the team to the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl 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.
- Parameters:
team- the team- Returns:
- the team that was added
-
addUserGroupTeam
boolean addUserGroupTeam(long userGroupId, long teamId) -
addUserGroupTeam
-
addUserGroupTeams
-
addUserGroupTeams
boolean addUserGroupTeams(long userGroupId, long[] teamIds) -
addUserTeam
boolean addUserTeam(long userId, long teamId) -
addUserTeam
-
addUserTeams
-
addUserTeams
boolean addUserTeams(long userId, long[] teamIds) -
clearUserGroupTeams
void clearUserGroupTeams(long userGroupId) -
clearUserTeams
void clearUserTeams(long userId) -
createPersistedModel
- Specified by:
createPersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
createTeam
Creates a new team with the primary key. Does not add the team to the database.- Parameters:
teamId- the primary key for the new team- Returns:
- the new team
-
deletePersistedModel
- Specified by:
deletePersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
deleteTeam
Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl 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.
- Parameters:
teamId- the primary key of the team- Returns:
- the team that was removed
- Throws:
PortalException- if a team with the primary key could not be found
-
deleteTeam
Deletes the team from the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl 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.
- Parameters:
team- the team- Returns:
- the team that was removed
- Throws:
PortalException
-
deleteTeams
- Throws:
PortalException
-
deleteUserGroupTeam
void deleteUserGroupTeam(long userGroupId, long teamId) -
deleteUserGroupTeam
-
deleteUserGroupTeams
-
deleteUserGroupTeams
void deleteUserGroupTeams(long userGroupId, long[] teamIds) -
deleteUserTeam
void deleteUserTeam(long userId, long teamId) -
deleteUserTeam
-
deleteUserTeams
-
deleteUserTeams
void deleteUserTeams(long userId, long[] teamIds) -
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryin interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCountin interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) <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 - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl.- 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
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic queryprojection- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchTeam
-
fetchTeam
-
fetchTeamByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Team fetchTeamByUuidAndGroupId(String uuid, long groupId) Returns the team matching the UUID and group.- Parameters:
uuid- the team's UUIDgroupId- the primary key of the group- Returns:
- the matching team, or
nullif a matching team could not be found
-
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getGroupTeams
-
getGroupTeamsCount
-
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModelin interfacePersistedModelLocalService- Throws:
PortalException
-
getTeam
@Transactional(propagation=SUPPORTS, readOnly=true) Team getTeam(long teamId) throws PortalException Returns the team with the primary key.- Parameters:
teamId- the primary key of the team- Returns:
- the team
- Throws:
PortalException- if a team with the primary key could not be found
-
getTeam
@Transactional(propagation=SUPPORTS, readOnly=true) Team getTeam(long groupId, String name) throws PortalException - Throws:
PortalException
-
getTeamByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Team getTeamByUuidAndGroupId(String uuid, long groupId) throws PortalException Returns the team matching the UUID and group.- Parameters:
uuid- the team's UUIDgroupId- the primary key of the group- Returns:
- the matching team
- Throws:
PortalException- if a matching team could not be found
-
getTeams
Returns a range of all the teams.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl.- Parameters:
start- the lower bound of the range of teamsend- the upper bound of the range of teams (not inclusive)- Returns:
- the range of teams
-
getTeamsByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getTeamsByUuidAndCompanyId(String uuid, long companyId) Returns all the teams matching the UUID and company.- Parameters:
uuid- the UUID of the teamscompanyId- the primary key of the company- Returns:
- the matching teams, or an empty list if no matches were found
-
getTeamsByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getTeamsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<Team> orderByComparator) Returns a range of teams matching the UUID and company.- Parameters:
uuid- the UUID of the teamscompanyId- the primary key of the companystart- the lower bound of the range of teamsend- the upper bound of the range of teams (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the range of matching teams, or an empty list if no matches were found
-
getTeamsCount
Returns the number of teams.- Returns:
- the number of teams
-
getUserGroupPrimaryKeys
Returns the userGroupIds of the user groups associated with the team.- Parameters:
teamId- the teamId of the team- Returns:
- long[] the userGroupIds of user groups associated with the team
-
getUserGroupTeams
-
getUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserGroupTeams(long userGroupId, int start, int end) -
getUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserGroupTeams(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserGroupTeamsCount
-
getUserOrUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserOrUserGroupTeams(long groupId, long userId) -
getUserPrimaryKeys
Returns the userIds of the users associated with the team.- Parameters:
teamId- the teamId of the team- Returns:
- long[] the userIds of users associated with the team
-
getUserTeams
-
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, int start, int end) -
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, long groupId) -
getUserTeamsCount
-
hasUserGroupTeam
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupTeam(long userGroupId, long teamId) -
hasUserGroupTeams
-
hasUserTeam
-
hasUserTeams
-
search
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> search(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) -
searchCount
@Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long groupId, String name, String description, LinkedHashMap<String, Object> params) -
setUserGroupTeams
void setUserGroupTeams(long userGroupId, long[] teamIds) -
setUserTeams
void setUserTeams(long userId, long[] teamIds) -
updateTeam
- Throws:
PortalException
-
updateTeam
Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl 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.
- Parameters:
team- the team- Returns:
- the team that was updated
-
getCTPersistence
- Specified by:
getCTPersistencein interfaceCTService<Team>
-
getModelClass
- Specified by:
getModelClassin interfaceCTService<Team>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Team>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunctionin interfaceCTService<Team>- Throws:
E extends Throwable
-