Class TeamLocalServiceUtil
com.liferay.portal.service.impl.TeamLocalServiceImpl and
is an access point for service operations in application layer code running
on the local server. Methods of this service will not have security checks
based on the propagated JAAS credentials because this service can only be
accessed from within the same VM.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TeamaddTeam(long userId, long groupId, String name, String description, ServiceContext serviceContext) static TeamAdds the team to the database.static booleanaddUserGroupTeam(long userGroupId, long teamId) static booleanaddUserGroupTeam(long userGroupId, Team team) static booleanaddUserGroupTeams(long userGroupId, long[] teamIds) static booleanaddUserGroupTeams(long userGroupId, List<Team> teams) static booleanaddUserTeam(long userId, long teamId) static booleanaddUserTeam(long userId, Team team) static booleanaddUserTeams(long userId, long[] teamIds) static booleanaddUserTeams(long userId, List<Team> teams) static voidclearUserGroupTeams(long userGroupId) static voidclearUserTeams(long userId) static PersistedModelcreatePersistedModel(Serializable primaryKeyObj) static TeamcreateTeam(long teamId) Creates a new team with the primary key.static PersistedModeldeletePersistedModel(PersistedModel persistedModel) static TeamdeleteTeam(long teamId) Deletes the team with the primary key from the database.static TeamdeleteTeam(Team team) Deletes the team from the database.static voiddeleteTeams(long groupId) static voiddeleteUserGroupTeam(long userGroupId, long teamId) static voiddeleteUserGroupTeam(long userGroupId, Team team) static voiddeleteUserGroupTeams(long userGroupId, long[] teamIds) static voiddeleteUserGroupTeams(long userGroupId, List<Team> teams) static voiddeleteUserTeam(long userId, long teamId) static voiddeleteUserTeam(long userId, Team team) static voiddeleteUserTeams(long userId, long[] teamIds) static voiddeleteUserTeams(long userId, List<Team> teams) static <T> TdslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static intdslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) static DynamicQuerystatic <T> List<T>dynamicQuery(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.static <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.static <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.static longdynamicQueryCount(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.static longdynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.static TeamfetchTeam(long teamId) static Teamstatic TeamfetchTeamByUuidAndGroupId(String uuid, long groupId) Returns the team matching the UUID and group.static ActionableDynamicQuerystatic ExportActionableDynamicQuerygetExportActionableDynamicQuery(PortletDataContext portletDataContext) getGroupTeams(long groupId) static intgetGroupTeamsCount(long groupId) static StringReturns the OSGi service identifier.static PersistedModelgetPersistedModel(Serializable primaryKeyObj) static TeamLocalServicestatic TeamgetTeam(long teamId) Returns the team with the primary key.static Teamstatic TeamgetTeamByUuidAndGroupId(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.static intReturns the number of teams.static 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) static intgetUserGroupTeamsCount(long userGroupId) getUserOrUserGroupTeams(long groupId, long userId) static 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) static intgetUserTeamsCount(long userId) static booleanhasUserGroupTeam(long userGroupId, long teamId) static booleanhasUserGroupTeams(long userGroupId) static booleanhasUserTeam(long userId, long teamId) static booleanhasUserTeams(long userId) search(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) static intsearchCount(long groupId, String name, String description, LinkedHashMap<String, Object> params) static voidsetService(TeamLocalService service) static voidsetUserGroupTeams(long userGroupId, long[] teamIds) static voidsetUserTeams(long userId, long[] teamIds) static TeamupdateTeam(long teamId, String name, String description) static TeamupdateTeam(Team team) Updates the team in the database or adds it if it does not yet exist.
-
Constructor Details
-
TeamLocalServiceUtil
public TeamLocalServiceUtil()
-
-
Method Details
-
addTeam
public static 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
public static boolean addUserGroupTeam(long userGroupId, long teamId) -
addUserGroupTeam
-
addUserGroupTeams
-
addUserGroupTeams
public static boolean addUserGroupTeams(long userGroupId, long[] teamIds) -
addUserTeam
public static boolean addUserTeam(long userId, long teamId) -
addUserTeam
-
addUserTeams
-
addUserTeams
public static boolean addUserTeams(long userId, long[] teamIds) -
clearUserGroupTeams
public static void clearUserGroupTeams(long userGroupId) -
clearUserTeams
public static void clearUserTeams(long userId) -
createPersistedModel
public static PersistedModel createPersistedModel(Serializable primaryKeyObj) throws PortalException - 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
public static PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException - 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
public static void deleteUserGroupTeam(long userGroupId, long teamId) -
deleteUserGroupTeam
-
deleteUserGroupTeams
-
deleteUserGroupTeams
public static void deleteUserGroupTeams(long userGroupId, long[] teamIds) -
deleteUserTeam
public static void deleteUserTeam(long userId, long teamId) -
deleteUserTeam
-
deleteUserTeams
-
deleteUserTeams
public static void deleteUserTeams(long userId, long[] teamIds) -
dslQuery
public static <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dslQueryCount
public static int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) -
dynamicQuery
-
dynamicQuery
Performs a dynamic query on the database and returns the matching rows.- 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 - 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
public static <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
Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery- the dynamic query- Returns:
- the number of rows matching the dynamic query
-
dynamicQueryCount
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
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
-
getExportActionableDynamicQuery
public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getGroupTeams
-
getGroupTeamsCount
public static int getGroupTeamsCount(long groupId) -
getIndexableActionableDynamicQuery
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
- Throws:
PortalException
-
getTeam
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
- Throws:
PortalException
-
getTeamByUuidAndGroupId
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
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
public static 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
public static int getTeamsCount()Returns the number of teams.- Returns:
- the number of teams
-
getUserGroupPrimaryKeys
public static long[] getUserGroupPrimaryKeys(long teamId) 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
-
getUserGroupTeams
public static List<Team> getUserGroupTeams(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserGroupTeamsCount
public static int getUserGroupTeamsCount(long userGroupId) -
getUserOrUserGroupTeams
-
getUserPrimaryKeys
public static long[] getUserPrimaryKeys(long teamId) 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
-
getUserTeams
public static List<Team> getUserTeams(long userId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserTeams
-
getUserTeamsCount
public static int getUserTeamsCount(long userId) -
hasUserGroupTeam
public static boolean hasUserGroupTeam(long userGroupId, long teamId) -
hasUserGroupTeams
public static boolean hasUserGroupTeams(long userGroupId) -
hasUserTeam
public static boolean hasUserTeam(long userId, long teamId) -
hasUserTeams
public static boolean hasUserTeams(long userId) -
search
public static List<Team> search(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) -
searchCount
public static int searchCount(long groupId, String name, String description, LinkedHashMap<String, Object> params) -
setUserGroupTeams
public static void setUserGroupTeams(long userGroupId, long[] teamIds) -
setUserTeams
public static 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
-
getService
-
setService
-